阿拉蕾 il y a 11 mois
Parent
commit
0adffda281
41 fichiers modifiés avec 8341 ajouts et 0 suppressions
  1. 59 0
      src/api/store/chineseMedicine.js
  2. 53 0
      src/api/store/department.js
  3. 60 0
      src/api/store/disease.js
  4. 62 0
      src/api/store/doctorArticle.js
  5. 59 0
      src/api/store/famousPrescribe.js
  6. 60 0
      src/api/store/illnessLibrary.js
  7. 60 0
      src/api/store/medicatedFood.js
  8. 59 0
      src/api/store/questions.js
  9. 53 0
      src/api/store/testReport.js
  10. 65 0
      src/api/store/testTemp.js
  11. 53 0
      src/api/store/testTempItem.js
  12. 65 0
      src/api/store/vessel.js
  13. 51 0
      src/components/DictTag/index.vue
  14. 195 0
      src/components/Editor copy/index.vue
  15. 156 0
      src/components/Editor copy/wang.vue
  16. 198 0
      src/components/FileUpload/index.vue
  17. 213 0
      src/components/ImageUpload/index.vue
  18. 12 0
      src/main.js
  19. 579 0
      src/views/store/chineseMedicine/index.vue
  20. 63 0
      src/views/store/components/IllnessLibraryDetails.vue
  21. 84 0
      src/views/store/components/chineseMedicineDetails.vue
  22. 119 0
      src/views/store/components/departmentDetails.vue
  23. 103 0
      src/views/store/components/diseaseDetails.vue
  24. 119 0
      src/views/store/components/doctorArticleDetails.vue
  25. 90 0
      src/views/store/components/famousPrescribeDetails.vue
  26. 80 0
      src/views/store/components/medicatedFoodDetails.vue
  27. 109 0
      src/views/store/components/testReportDetails.vue
  28. 108 0
      src/views/store/components/testTempDetails.vue
  29. 116 0
      src/views/store/components/testTempItemDetails.vue
  30. 80 0
      src/views/store/components/vesselDetails.vue
  31. 442 0
      src/views/store/department/index.vue
  32. 419 0
      src/views/store/disease/index.vue
  33. 542 0
      src/views/store/doctorArticle/index.vue
  34. 594 0
      src/views/store/famousPrescribe/index.vue
  35. 339 0
      src/views/store/illnessLibrary/index.vue
  36. 587 0
      src/views/store/medicatedFood/index.vue
  37. 441 0
      src/views/store/questions/index.vue
  38. 298 0
      src/views/store/testReport/index.vue
  39. 610 0
      src/views/store/testTemp/index.vue
  40. 324 0
      src/views/store/testTempItem/index.vue
  41. 562 0
      src/views/store/vessel/index.vue

+ 59 - 0
src/api/store/chineseMedicine.js

@@ -0,0 +1,59 @@
+import request from '@/utils/request'
+
+// 查询中药科普管理列表
+export function listChineseMedicine(query) {
+  return request({
+    url: '/his/chineseMedicine/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询中药科普管理详细
+export function getChineseMedicine(id) {
+  return request({
+    url: '/his/chineseMedicine/' + id,
+    method: 'get'
+  })
+}
+// 下载导入模板
+export function importTemplate() {
+  return request({
+    url: '/his/chineseMedicine/importTemplate',
+    method: 'get'
+  })
+}
+// 新增中药科普管理
+export function addChineseMedicine(data) {
+  return request({
+    url: '/his/chineseMedicine',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改中药科普管理
+export function updateChineseMedicine(data) {
+  return request({
+    url: '/his/chineseMedicine',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除中药科普管理
+export function delChineseMedicine(id) {
+  return request({
+    url: '/his/chineseMedicine/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出中药科普管理
+export function exportChineseMedicine(query) {
+  return request({
+    url: '/his/chineseMedicine/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/store/department.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询科室列表
+export function listDepartment(query) {
+  return request({
+    url: '/his/department/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询科室详细
+export function getDepartment(deptId) {
+  return request({
+    url: '/his/department/' + deptId,
+    method: 'get'
+  })
+}
+
+// 新增科室
+export function addDepartment(data) {
+  return request({
+    url: '/his/department',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改科室
+export function updateDepartment(data) {
+  return request({
+    url: '/his/department',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除科室
+export function delDepartment(deptId) {
+  return request({
+    url: '/his/department/' + deptId,
+    method: 'delete'
+  })
+}
+
+// 导出科室
+export function exportDepartment(query) {
+  return request({
+    url: '/his/department/export',
+    method: 'get',
+    params: query
+  })
+}

+ 60 - 0
src/api/store/disease.js

@@ -0,0 +1,60 @@
+import request from '@/utils/request'
+
+// 查询疾病列表
+export function listDisease(query) {
+  return request({
+    url: '/his/disease/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询疾病详细
+export function getDisease(diseaseId) {
+  return request({
+    url: '/his/disease/' + diseaseId,
+    method: 'get'
+  })
+}
+// 查询科室列表
+export function listDepartment(query) {
+  return request({
+    url: '/his/department/listOptions',
+    method: 'get',
+    params: query
+  })
+}
+// 新增疾病
+export function addDisease(data) {
+  return request({
+    url: '/his/disease',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改疾病
+export function updateDisease(data) {
+  return request({
+    url: '/his/disease',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除疾病
+export function delDisease(diseaseId) {
+  return request({
+    url: '/his/disease/' + diseaseId,
+    method: 'delete'
+  })
+}
+
+// 导出疾病
+export function exportDisease(query) {
+  return request({
+    url: '/his/disease/export',
+    method: 'get',
+    params: query
+  })
+}

+ 62 - 0
src/api/store/doctorArticle.js

@@ -0,0 +1,62 @@
+import request from '@/utils/request'
+
+// 查询医生文章列表
+export function listArticle(query) {
+  return request({
+    url: '/his/doctorArticle/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询医生名称列表
+export function listdocuser(query) {
+  return request({
+    url: '/his/doctor/userdoc/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询医生文章详细
+export function getArticle(articleId) {
+  return request({
+    url: '/his/doctorArticle/' + articleId,
+    method: 'get'
+  })
+}
+
+// 新增医生文章
+export function addArticle(data) {
+  return request({
+    url: '/his/doctorArticle',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改医生文章
+export function updateArticle(data) {
+  return request({
+    url: '/his/doctorArticle',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除医生文章
+export function delArticle(articleId) {
+  return request({
+    url: '/his/doctorArticle/' + articleId,
+    method: 'delete'
+  })
+}
+
+// 导出医生文章
+export function exportArticle(query) {
+  return request({
+    url: '/his/doctorArticle/export',
+    method: 'get',
+    params: query
+  })
+}

+ 59 - 0
src/api/store/famousPrescribe.js

@@ -0,0 +1,59 @@
+import request from '@/utils/request'
+
+// 查询经典名方列表
+export function listFamousPrescribe(query) {
+  return request({
+    url: '/his/famousPrescribe/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询经典名方详细
+export function getFamousPrescribe(id) {
+  return request({
+    url: '/his/famousPrescribe/' + id,
+    method: 'get'
+  })
+}
+// 下载导入模板
+export function importTemplate() {
+  return request({
+    url: '/his/chineseMedicine/importTemplate',
+    method: 'get'
+  })
+}
+// 新增经典名方
+export function addFamousPrescribe(data) {
+  return request({
+    url: '/his/famousPrescribe',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改经典名方
+export function updateFamousPrescribe(data) {
+  return request({
+    url: '/his/famousPrescribe',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除经典名方
+export function delFamousPrescribe(id) {
+  return request({
+    url: '/his/famousPrescribe/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出经典名方
+export function exportFamousPrescribe(query) {
+  return request({
+    url: '/his/famousPrescribe/export',
+    method: 'get',
+    params: query
+  })
+}

+ 60 - 0
src/api/store/illnessLibrary.js

@@ -0,0 +1,60 @@
+import request from '@/utils/request'
+
+// 查询中医疾病列表
+export function listillnessLibrary(query) {
+  return request({
+    url: '/his/illnessLibrary/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询中医疾病详细
+export function getillnessLibrary(illnessId) {
+  return request({
+    url: '/his/illnessLibrary/' + illnessId,
+    method: 'get'
+  })
+}
+export function getIllness(query) {
+  return request({
+    url: '/his/illnessLibrary/getIllness/',
+    method: 'get',
+    params: query
+  })
+}
+
+// 新增中医疾病
+export function addillnessLibrary(data) {
+  return request({
+    url: '/his/illnessLibrary',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改中医疾病
+export function updateillnessLibrary(data) {
+  return request({
+    url: '/his/illnessLibrary',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除中医疾病
+export function delillnessLibrary(illnessId) {
+  return request({
+    url: '/his/illnessLibrary/' + illnessId,
+    method: 'delete'
+  })
+}
+
+// 导出中医疾病
+export function exportillnessLibrary(query) {
+  return request({
+    url: '/his/illnessLibrary/export',
+    method: 'get',
+    params: query
+  })
+}

+ 60 - 0
src/api/store/medicatedFood.js

@@ -0,0 +1,60 @@
+import request from '@/utils/request'
+
+// 查询药膳食疗列表
+export function listMedicatedFood(query) {
+  return request({
+    url: '/his/medicatedFood/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 下载导入模板
+export function importTemplate() {
+  return request({
+    url: '/his/medicatedFood/importTemplate',
+    method: 'get'
+  })
+}
+// 查询药膳食疗详细
+export function getMedicatedFood(id) {
+  return request({
+    url: '/his/medicatedFood/' + id,
+    method: 'get'
+  })
+}
+
+// 新增药膳食疗
+export function addMedicatedFood(data) {
+  return request({
+    url: '/his/medicatedFood',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改药膳食疗
+export function updateMedicatedFood(data) {
+  return request({
+    url: '/his/medicatedFood',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除药膳食疗
+export function delMedicatedFood(id) {
+  return request({
+    url: '/his/medicatedFood/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出药膳食疗
+export function exportMedicatedFood(query) {
+  return request({
+    url: '/his/medicatedFood/export',
+    method: 'get',
+    params: query
+  })
+}

+ 59 - 0
src/api/store/questions.js

@@ -0,0 +1,59 @@
+import request from '@/utils/request'
+
+// 查询问答专区列表
+export function listQuestions(query) {
+  return request({
+    url: '/his/questions/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询问答专区详细
+export function getQuestions(id) {
+  return request({
+    url: '/his/questions/' + id,
+    method: 'get'
+  })
+}
+// 下载导入模板
+export function importTemplate() {
+  return request({
+    url: '/his/questions/importTemplate',
+    method: 'get'
+  })
+}
+// 新增问答专区
+export function addQuestions(data) {
+  return request({
+    url: '/his/questions',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改问答专区
+export function updateQuestions(data) {
+  return request({
+    url: '/his/questions',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除问答专区
+export function delQuestions(id) {
+  return request({
+    url: '/his/questions/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出问答专区
+export function exportQuestions(query) {
+  return request({
+    url: '/his/questions/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/store/testReport.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询测试报告列表
+export function listTestReport(query) {
+  return request({
+    url: '/his/testReport/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询测试报告详细
+export function getTestReport(reportId) {
+  return request({
+    url: '/his/testReport/' + reportId,
+    method: 'get'
+  })
+}
+
+// 新增测试报告
+export function addTestReport(data) {
+  return request({
+    url: '/his/testReport',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改测试报告
+export function updateTestReport(data) {
+  return request({
+    url: '/his/testReport',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除测试报告
+export function delTestReport(reportId) {
+  return request({
+    url: '/his/testReport/' + reportId,
+    method: 'delete'
+  })
+}
+
+// 导出测试报告
+export function exportTestReport(query) {
+  return request({
+    url: '/his/testReport/export',
+    method: 'get',
+    params: query
+  })
+}

+ 65 - 0
src/api/store/testTemp.js

@@ -0,0 +1,65 @@
+import request from '@/utils/request'
+
+// 查询测一测模板列表
+export function listTestTemp(query) {
+  return request({
+    url: '/his/testTemp/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询测一测模板详细
+export function getTempType(tempId) {
+  return request({
+    url: '/his/testTemp/getTempType/' + tempId,
+    method: 'get'
+  })
+}
+export function getTestTemp(tempId) {
+  return request({
+    url: '/his/testTemp/' + tempId,
+    method: 'get'
+  })
+}
+export function getAllTestTemp() {
+  return request({
+    url: '/his/testTemp/allList',
+    method: 'get'
+  })
+}
+
+// 新增测一测模板
+export function addTestTemp(data) {
+  return request({
+    url: '/his/testTemp',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改测一测模板
+export function updateTestTemp(data) {
+  return request({
+    url: '/his/testTemp',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除测一测模板
+export function delTestTemp(tempId) {
+  return request({
+    url: '/his/testTemp/' + tempId,
+    method: 'delete'
+  })
+}
+
+// 导出测一测模板
+export function exportTestTemp(query) {
+  return request({
+    url: '/his/testTemp/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/store/testTempItem.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询模板项目列表
+export function listTestTempItem(query) {
+  return request({
+    url: '/his/testTempItem/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询模板项目详细
+export function getTestTempItem(itemId) {
+  return request({
+    url: '/his/testTempItem/' + itemId,
+    method: 'get'
+  })
+}
+
+// 新增模板项目
+export function addTestTempItem(data) {
+  return request({
+    url: '/his/testTempItem',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改模板项目
+export function updateTestTempItem(data) {
+  return request({
+    url: '/his/testTempItem',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除模板项目
+export function delTestTempItem(itemId) {
+  return request({
+    url: '/his/testTempItem/' + itemId,
+    method: 'delete'
+  })
+}
+
+// 导出模板项目
+export function exportTestTempItem(query) {
+  return request({
+    url: '/his/testTempItem/export',
+    method: 'get',
+    params: query
+  })
+}

+ 65 - 0
src/api/store/vessel.js

@@ -0,0 +1,65 @@
+import request from '@/utils/request'
+
+// 查询经络管理列表
+export function listVessel(query) {
+  return request({
+    url: '/his/vessel/list',
+    method: 'get',
+    params: query
+  })
+}
+export function getAllList() {
+  return request({
+    url: '/his/vessel/allList',
+    method: 'get'
+  })
+}
+
+// 查询经络管理详细
+export function getVessel(id) {
+  return request({
+    url: '/his/vessel/' + id,
+    method: 'get'
+  })
+}
+// 下载导入模板
+export function importTemplate() {
+  return request({
+    url: '/his/questions/importTemplate',
+    method: 'get'
+  })
+}
+// 新增经络管理
+export function addVessel(data) {
+  return request({
+    url: '/his/vessel',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改经络管理
+export function updateVessel(data) {
+  return request({
+    url: '/his/vessel',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除经络管理
+export function delVessel(id) {
+  return request({
+    url: '/his/vessel/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出经络管理
+export function exportVessel(query) {
+  return request({
+    url: '/his/vessel/export',
+    method: 'get',
+    params: query
+  })
+}

+ 51 - 0
src/components/DictTag/index.vue

@@ -0,0 +1,51 @@
+<template>
+  <div>
+    <template v-for="(item, index) in options">
+      <template v-if="values.includes(item.dictValue)">
+        <span
+          v-if="item.listClass == 'default' || item.listClass == ''"
+          :key="item.dictValue"
+          :index="index"
+          :class="item.cssClass"
+          >{{ item.dictLabel }}</span
+        >
+        <el-tag
+          v-else
+          :key="item.dictValue"
+          :index="index"
+          :type="item.listClass == 'primary' ? '' : item.listClass"
+          :class="item.cssClass"
+        >
+          {{ item.dictLabel }}
+        </el-tag>
+      </template>
+    </template>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "DictTag",
+  props: {
+    options: {
+      type: Array,
+      default: null,
+    },
+    value: [Number, String, Array],
+  },
+  computed: {
+    values() {
+      if (this.value !== null && typeof this.value !== 'undefined') {
+        return Array.isArray(this.value) ? this.value : [String(this.value)];
+      } else {
+        return [];
+      }
+    },
+  },
+};
+</script>
+<style scoped>
+.el-tag + .el-tag {
+  margin-left: 10px;
+}
+</style>

+ 195 - 0
src/components/Editor copy/index.vue

@@ -0,0 +1,195 @@
+<template>
+    <div class="editor" ref="editor" :style="styles"></div>
+</template>
+
+<script>
+import Quill from "quill";
+import "quill/dist/quill.core.css";
+import "quill/dist/quill.snow.css";
+import "quill/dist/quill.bubble.css";
+
+export default {
+  name: "Editor",
+  props: {
+    /* 编辑器的内容 */
+    value: {
+      type: String,
+      default: "",
+    },
+    /* 高度 */
+    height: {
+      type: Number,
+      default: null,
+    },
+    /* 最小高度 */
+    minHeight: {
+      type: Number,
+      default: null,
+    },
+  },
+  data() {
+    return {
+      Quill: null,
+      currentValue: "",
+      options: {
+        theme: "snow",
+        bounds: document.body,
+        debug: "warn",
+        modules: {
+          // 工具栏配置
+          toolbar: [
+            ["bold", "italic", "underline", "strike"],       // 加粗 斜体 下划线 删除线
+            ["blockquote", "code-block"],                    // 引用  代码块
+            [{ list: "ordered" }, { list: "bullet" }],       // 有序、无序列表
+            [{ indent: "-1" }, { indent: "+1" }],            // 缩进
+            [{ size: ["small", false, "large", "huge"] }],   // 字体大小
+            [{ header: [1, 2, 3, 4, 5, 6, false] }],         // 标题
+            [{ color: [] }, { background: [] }],             // 字体颜色、字体背景颜色
+            [{ align: [] }],                                 // 对齐方式
+            ["clean"],                                       // 清除文本格式
+            ["image"]                       // 链接、图片、视频
+          ],
+        },
+        placeholder: "请输入内容",
+        readOnly: false,
+      },
+    };
+  },
+  computed: {
+    styles() {
+      let style = {};
+      if (this.minHeight) {
+        style.minHeight = `${this.minHeight}px`;
+      }
+      if (this.height) {
+        style.height = `${this.height}px`;
+      }
+      return style;
+    },
+  },
+  watch: {
+    value: {
+      handler(val) {
+        if (val !== this.currentValue) {
+          this.currentValue = val === null ? "" : val;
+          if (this.Quill) {
+            this.Quill.pasteHTML(this.currentValue);
+          }
+        }
+      },
+      immediate: true,
+    },
+  },
+  mounted() {
+    this.init();
+  },
+  beforeDestroy() {
+    this.Quill = null;
+  },
+  methods: {
+    init() {
+      const editor = this.$refs.editor;
+      this.Quill = new Quill(editor, this.options);
+      this.Quill.pasteHTML(this.currentValue);
+      this.Quill.on("text-change", (delta, oldDelta, source) => {
+        const html = this.$refs.editor.children[0].innerHTML;
+        const text = this.Quill.getText();
+        const quill = this.Quill;
+        this.currentValue = html;
+        this.$emit("input", html);
+        this.$emit("on-change", { html, text, quill });
+      });
+      this.Quill.on("text-change", (delta, oldDelta, source) => {
+        this.$emit("on-text-change", delta, oldDelta, source);
+      });
+      this.Quill.on("selection-change", (range, oldRange, source) => {
+        this.$emit("on-selection-change", range, oldRange, source);
+      });
+      this.Quill.on("editor-change", (eventName, ...args) => {
+        this.$emit("on-editor-change", eventName, ...args);
+      });
+    },
+  },
+};
+</script>
+
+<style>
+.editor, .ql-toolbar {
+  white-space: pre-wrap!important;
+  line-height: normal !important;
+}
+.quill-img {
+  display: none;
+}
+.ql-snow .ql-tooltip[data-mode="link"]::before {
+  content: "请输入链接地址:";
+}
+.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
+  border-right: 0px;
+  content: "保存";
+  padding-right: 0px;
+}
+
+.ql-snow .ql-tooltip[data-mode="video"]::before {
+  content: "请输入视频地址:";
+}
+
+.ql-snow .ql-picker.ql-size .ql-picker-label::before,
+.ql-snow .ql-picker.ql-size .ql-picker-item::before {
+  content: "14px";
+}
+.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
+.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
+  content: "10px";
+}
+.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
+.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
+  content: "18px";
+}
+.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
+.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
+  content: "32px";
+}
+
+.ql-snow .ql-picker.ql-header .ql-picker-label::before,
+.ql-snow .ql-picker.ql-header .ql-picker-item::before {
+  content: "文本";
+}
+.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
+.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
+  content: "标题1";
+}
+.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
+.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
+  content: "标题2";
+}
+.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
+.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
+  content: "标题3";
+}
+.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
+.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
+  content: "标题4";
+}
+.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
+.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
+  content: "标题5";
+}
+.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
+.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
+  content: "标题6";
+}
+
+.ql-snow .ql-picker.ql-font .ql-picker-label::before,
+.ql-snow .ql-picker.ql-font .ql-picker-item::before {
+  content: "标准字体";
+}
+.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
+.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
+  content: "衬线字体";
+}
+.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
+.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
+  content: "等宽字体";
+}
+</style>

+ 156 - 0
src/components/Editor copy/wang.vue

@@ -0,0 +1,156 @@
+<template>  
+    <div>
+      <div  ref='editor1' class="myedit"></div>
+    </div> 
+</template>  
+  
+<script>  
+  import E from 'wangeditor'  
+  export default {  
+    name: 'editoritem',  
+    data() {  
+      return {
+        index:0,
+        uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadWang",
+        editor: null
+      }  
+    },
+    created() {
+       
+      
+    },
+    beforeDestroy() {
+      // 销毁编辑器
+      if(this.editor!=null){
+        this.editor.destroy()
+        this.editor = null
+      }
+      
+    },
+    methods:{
+      initEditor(){
+        var that=this;
+        if(this.editor==null){
+            //创建编辑器
+            this.editor = new E(that.$refs.editor1 )
+            this.editor.config.uploadImgServer = this.uploadUrl;
+
+
+            
+             this.editor.config.uploadImgMaxLength = 5
+            this.editor.config.uploadImgMaxSize = 2 * 1024 * 1024 // 2M
+            this.editor.config.uploadImgAccept = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']
+            this.editor.config.uploadFileName = 'file'
+            this.editor.config.zIndex = 1
+            this.editor.config.menus = [
+              'head',
+              'bold',
+              'fontSize',
+              'fontName',
+              'italic',
+              'underline',
+              'strikeThrough',
+              'indent',
+              'lineHeight',
+              'foreColor',
+              'backColor',
+              'link',
+              'list',
+              'todo',
+              'justify',
+              'quote',
+              'emoticon',
+              'image',
+              // 'video',
+              'table',
+              'code',
+              'splitLine',
+              'undo',
+              'redo',
+          ]
+          this.editor.config.onchange = function (newHtml) {
+            console.log(newHtml)
+            that.$emit("on-text-change", newHtml);
+          }
+          this.editor.config.pasteFilterStyle = false
+          // 配置触发 onchange 的时间频率,默认为 200ms
+          this.editor.config.onchangeTimeout = 500 // 修改为 500ms
+            this.editor.config.uploadImgHooks = {
+                // 上传图片之前
+                before: function(xhr) {
+                    //console.log(xhr)
+                    
+                },
+                // 图片上传并返回了结果,图片插入已成功
+                success: function(xhr) {
+                    //console.log('success', xhr)
+                },
+                // 图片上传并返回了结果,但图片插入时出错了
+                fail: function(xhr, editor, resData) {
+                    console.log('fail', resData)
+                },
+                // 上传图片出错,一般为 http 请求的错误
+                error: function(xhr, editor, resData) {
+                    console.log('error', xhr, resData)
+                },
+                // 上传图片超时
+                timeout: function(xhr) {
+                    //console.log('timeout')
+                },
+                // 图片上传并返回了结果,想要自己把图片插入到编辑器中
+                // 例如服务器端返回的不是 { errno: 0, data: [...] } 这种格式,可使用 customInsert
+                customInsert: function(insertImg, result, editor) {
+                      console.log(result);
+                      // 图片上传并返回结果,自定义插入图片的事件(而不是编辑器自动插入图片!!!)
+                      // insertImg 是插入图片的函数,editor 是编辑器对象,result 是服务器端返回的结果
+                      // 举例:假如上传图片成功后,服务器端返回的是 {url:'....'} 这种格式,即可这样插入图片:
+                      // var url =   result.data[0].url
+                      if(result.data!=null){
+                        for(var i=0;i<result.data.length;i++){
+                            var url =   result.data[i].url
+                            insertImg(url)
+                          }
+                          console.log(url);
+                      }
+                      
+                     
+                      // result 必须是一个 JSON 格式字符串!!!否则报错
+                }
+            }
+            this.editor.create()
+        }
+        this.editor.txt.html("");
+      },
+      setText(text){
+        if(this.editor==null){
+          this.initEditor()
+        }
+        if(text==undefined||text==null){
+          this.editor.txt.html("");
+        }
+        else{
+          this.editor.txt.html(text);
+        }
+        
+      },
+     }
+   
+  }  
+</script>  
+  
+<style scoped>
+.toolbar {
+  border: 1px solid #ccc;
+}
+.myedit {
+  min-height: 300px;
+  z-index: 1 !important;
+}
+.w-e-toolbar{
+  z-index: 1 !important;
+}
+.w-e-text-container{
+  z-index: 1 !important;
+}
+ 
+</style>

+ 198 - 0
src/components/FileUpload/index.vue

@@ -0,0 +1,198 @@
+<template>
+  <div class="upload-file">
+    <el-upload
+      :action="uploadFileUrl"
+      :before-upload="handleBeforeUpload"
+      :file-list="fileList"
+      :limit="limit"
+      :on-error="handleUploadError"
+      :on-exceed="handleExceed"
+      :on-success="handleUploadSuccess"
+      :show-file-list="false"
+      :headers="headers"
+      class="upload-file-uploader"
+      ref="upload"
+    >
+      <!-- 上传按钮 -->
+      <el-button size="mini" type="primary">选取文件</el-button>
+      <!-- 上传提示 -->
+      <div class="el-upload__tip" slot="tip" v-if="showTip">
+        请上传
+        <template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
+        <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
+        的文件
+      </div>
+    </el-upload>
+
+    <!-- 文件列表 -->
+    <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
+      <li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
+        <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
+          <span class="el-icon-document"> {{ getFileName(file.name) }} </span>
+        </el-link>
+        <div class="ele-upload-list__item-content-action">
+          <el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
+        </div>
+      </li>
+    </transition-group>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+
+export default {
+  name: "FileUpload",
+  props: {
+    // 值
+    value: [String, Object, Array],
+    // 数量限制
+    limit: {
+      type: Number,
+      default: 5,
+    },
+    // 大小限制(MB)
+    fileSize: {
+      type: Number,
+      default: 5,
+    },
+    // 文件类型, 例如['png', 'jpg', 'jpeg']
+    fileType: {
+      type: Array,
+      default: () => ["doc", "xls", "ppt", "txt", "pdf"],
+    },
+    // 是否显示提示
+    isShowTip: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      baseUrl: process.env.VUE_APP_BASE_API,
+      uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
+      headers: {
+        Authorization: "Bearer " + getToken(),
+      },
+      fileList: [],
+    };
+  },
+  watch: {
+    value: {
+      handler(val) {
+        if (val) {
+          let temp = 1;
+          // 首先将值转为数组
+          const list = Array.isArray(val) ? val : this.value.split(',');
+          // 然后将数组转为对象数组
+          this.fileList = list.map(item => {
+            if (typeof item === "string") {
+              item = { name: item, url: item };
+            }
+            item.uid = item.uid || new Date().getTime() + temp++;
+            return item;
+          });
+        } else {
+          this.fileList = [];
+          return [];
+        }
+      },
+      deep: true,
+      immediate: true
+    }
+  },
+  computed: {
+    // 是否显示提示
+    showTip() {
+      return this.isShowTip && (this.fileType || this.fileSize);
+    },
+  },
+  methods: {
+    // 上传前校检格式和大小
+    handleBeforeUpload(file) {
+      // 校检文件类型
+      if (this.fileType) {
+        let fileExtension = "";
+        if (file.name.lastIndexOf(".") > -1) {
+          fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
+        }
+        const isTypeOk = this.fileType.some((type) => {
+          if (file.type.indexOf(type) > -1) return true;
+          if (fileExtension && fileExtension.indexOf(type) > -1) return true;
+          return false;
+        });
+        if (!isTypeOk) {
+          this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
+          return false;
+        }
+      }
+      // 校检文件大小
+      if (this.fileSize) {
+        const isLt = file.size / 1024 / 1024 < this.fileSize;
+        if (!isLt) {
+          this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
+          return false;
+        }
+      }
+      return true;
+    },
+    // 文件个数超出
+    handleExceed() {
+      this.$message.error(`上传文件数量不能超过 ${this.limit} 个!`);
+    },
+    // 上传失败
+    handleUploadError(err) {
+      this.$message.error("上传失败, 请重试");
+    },
+    // 上传成功回调
+    handleUploadSuccess(res, file) {
+      this.$message.success("上传成功");
+      this.fileList.push({ name: res.fileName, url: res.fileName });
+      this.$emit("input", this.listToString(this.fileList));
+    },
+    // 删除文件
+    handleDelete(index) {
+      this.fileList.splice(index, 1);
+      this.$emit("input", this.listToString(this.fileList));
+    },
+    // 获取文件名称
+    getFileName(name) {
+      if (name.lastIndexOf("/") > -1) {
+        return name.slice(name.lastIndexOf("/") + 1).toLowerCase();
+      } else {
+        return "";
+      }
+    },
+    // 对象转成指定字符串分隔
+    listToString(list, separator) {
+      let strs = "";
+      separator = separator || ",";
+      for (let i in list) {
+        strs += list[i].url + separator;
+      }
+      return strs != '' ? strs.substr(0, strs.length - 1) : '';
+    }
+  }
+};
+</script>
+
+<style scoped lang="scss">
+.upload-file-uploader {
+  margin-bottom: 5px;
+}
+.upload-file-list .el-upload-list__item {
+  border: 1px solid #e4e7ed;
+  line-height: 2;
+  margin-bottom: 10px;
+  position: relative;
+}
+.upload-file-list .ele-upload-list__item-content {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  color: inherit;
+}
+.ele-upload-list__item-content-action .el-link {
+  margin-right: 10px;
+}
+</style>

+ 213 - 0
src/components/ImageUpload/index.vue

@@ -0,0 +1,213 @@
+<template>
+  <div class="component-upload-image">
+    <el-upload
+      :action="uploadImgUrl"
+      list-type="picture-card"
+      :on-success="handleUploadSuccess"
+      :before-upload="handleBeforeUpload"
+      :limit="limit"
+      :on-error="handleUploadError"
+      :on-exceed="handleExceed"
+      name="file"
+      :on-remove="handleRemove"
+      :show-file-list="true"
+      :file-list="fileList"
+      :on-preview="handlePictureCardPreview"
+      :class="{hide: this.fileList.length >= this.limit}"
+    >
+      <i class="el-icon-plus"></i>
+    </el-upload>
+
+    <!-- 上传提示 -->
+<!--    <div class="el-upload__tip" slot="tip" v-if="showTip">
+      请上传
+      <template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
+      <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
+      的文件
+    </div> -->
+
+    <el-dialog
+      :visible.sync="dialogVisible"
+      title="预览"
+      width="800"
+      append-to-body
+    >
+      <img
+        :src="dialogImageUrl"
+        style="display: block; max-width: 100%; margin: 0 auto"
+      />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+
+export default {
+  props: {
+    value: [String, Object, Array],
+    // 图片数量限制
+    limit: {
+      type: Number,
+      default: 10,
+    },
+    // 大小限制(MB)
+    fileSize: {
+       type: Number,
+      default: 5,
+    },
+    // 文件类型, 例如['png', 'jpg', 'jpeg']
+    fileType: {
+      type: Array,
+      default: () => ["png", "jpg", "jpeg"],
+    },
+    // 是否显示提示
+    isShowTip: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      dialogImageUrl: "",
+      dialogVisible: false,
+      hideUpload: false,
+      baseUrl: process.env.VUE_APP_BASE_API,
+      uploadImgUrl: process.env.VUE_APP_BASE_API+"/common/uploadOSS", // 上传的图片服务器地址
+      headers: {
+        Authorization: "Bearer " + getToken(),
+      },
+      fileList: []
+    };
+  },
+  watch: {
+    value: {
+      handler(val) {
+        if (val) {
+          // 首先将值转为数组
+          const list = Array.isArray(val) ? val : this.value.split(',');
+          // 然后将数组转为对象数组
+          this.fileList = list.map(item => {
+            if (typeof item === "string") {
+              if (item.indexOf(this.baseUrl) === -1) {
+                  item = { name: item, url: item };
+              } else {
+                  item = { name: item, url: item };
+              }
+            }
+            return item;
+          });
+        } else {
+          this.fileList = [];
+          return [];
+        }
+      },
+      deep: true,
+      immediate: true
+    }
+  },
+  computed: {
+    // 是否显示提示
+    showTip() {
+      return this.isShowTip && (this.fileType || this.fileSize);
+    },
+  },
+  methods: {
+    // 删除图片
+    handleRemove(file, fileList) {
+      const findex = this.fileList.map(f => f.name).indexOf(file.name);
+      if(findex > -1) {
+        this.fileList.splice(findex, 1);
+        this.$emit("input", this.listToString(this.fileList));
+      }
+    },
+    // 上传成功回调
+    handleUploadSuccess(res) {
+      console.log(res)
+      this.fileList.push({ name: res.url, url: res.url });
+      this.$emit("input", this.listToString(this.fileList));
+      this.loading.close();
+    },
+    // 上传前loading加载
+    handleBeforeUpload(file) {
+      let isImg = false;
+      if (this.fileType.length) {
+        let fileExtension = "";
+        if (file.name.lastIndexOf(".") > -1) {
+          fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
+        }
+        isImg = this.fileType.some(type => {
+          if (file.type.indexOf(type) > -1) return true;
+          if (fileExtension && fileExtension.indexOf(type) > -1) return true;
+          return false;
+        });
+      } else {
+        isImg = file.type.indexOf("image") > -1;
+      }
+
+      if (!isImg) {
+        this.$message.error(
+          `文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`
+        );
+        return false;
+      }
+      if (this.fileSize) {
+        const isLt = file.size / 1024 / 1024 < this.fileSize;
+        if (!isLt) {
+          this.$message.error(`上传头像图片大小不能超过 ${this.fileSize} MB!`);
+          return false;
+        }
+      }
+      this.loading = this.$loading({
+        lock: true,
+        text: "上传中",
+        background: "rgba(0, 0, 0, 0.7)",
+      });
+    },
+    // 文件个数超出
+    handleExceed() {
+      this.$message.error(`上传文件数量不能超过 ${this.limit} 个!`);
+    },
+    // 上传失败
+    handleUploadError() {
+      this.$message({
+        type: "error",
+        message: "上传失败",
+      });
+      this.loading.close();
+    },
+    // 预览
+    handlePictureCardPreview(file) {
+      console.log(file)
+      this.dialogImageUrl = file.url;
+      this.dialogVisible = true;
+    },
+    // 对象转成指定字符串分隔
+    listToString(list, separator) {
+      let strs = "";
+      separator = separator || ",";
+      for (let i in list) {
+        strs += list[i].url.replace(this.baseUrl, "") + separator;
+      }
+      return strs != '' ? strs.substr(0, strs.length - 1) : '';
+    }
+  }
+};
+</script>
+<style scoped lang="scss">
+// .el-upload--picture-card 控制加号部分
+::v-deep.hide .el-upload--picture-card {
+    display: none;
+}
+// 去掉动画效果
+::v-deep .el-list-enter-active,
+::v-deep .el-list-leave-active {
+    transition: all 0s;
+}
+
+::v-deep .el-list-enter, .el-list-leave-active {
+    opacity: 0;
+    transform: translateY(0);
+}
+</style>
+

+ 12 - 0
src/main.js

@@ -23,6 +23,14 @@ import { getDicts } from "@/api/system/dict/data";
 import { getConfigKey } from "@/api/system/config";
 import { getAge,parsePhoto,formatDate,parsePost,parseArr,formatMoney,parseTime,dateFormat, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/common";
 import Pagination from "@/components/Pagination";
+// 富文本组件
+import Editor from "@/components/Editor"
+// 文件上传组件
+import FileUpload from "@/components/FileUpload"
+// 图片上传组件
+import ImageUpload from "@/components/ImageUpload"
+// 字典标签组件
+import DictTag from '@/components/DictTag'
 //自定义表格工具扩展
 import RightToolbar from "@/components/RightToolbar"
 import FormMaking from 'form-making'
@@ -76,8 +84,12 @@ Vue.prototype.msgInfo = function (msg) {
 }
 
 // 全局组件挂载
+Vue.component('DictTag', DictTag)
 Vue.component('Pagination', Pagination)
 Vue.component('RightToolbar', RightToolbar)
+Vue.component('Editor', Editor)
+Vue.component('FileUpload', FileUpload)
+Vue.component('ImageUpload', ImageUpload)
 
 Vue.use(permission)
 

+ 579 - 0
src/views/store/chineseMedicine/index.vue

@@ -0,0 +1,579 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="中药名称" prop="medicineName">
+        <el-input
+          v-model="queryParams.medicineName"
+          placeholder="请输入中药名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="是否常见" prop="isUsual">
+        <el-select v-model="queryParams.isUsual" placeholder="请选择是否生活常见" clearable size="small">
+          <el-option
+            v-for="dict in isUsualOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:chineseMedicine:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['his:chineseMedicine:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:chineseMedicine:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:chineseMedicine:export']"
+        >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+              <el-button
+                type="info"
+                plain
+                icon="el-icon-upload2"
+                size="mini"
+                @click="handleImport"
+
+              >导入</el-button>
+      </el-col>
+
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table height="660" v-loading="loading" :data="chineseMedicineList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="图片" align="center" prop="imgUrl" >
+        <template slot-scope="scope">
+               <el-popover
+                 placement="right"
+                 title=""
+                 trigger="hover">
+                 <img slot="reference" :src="scope.row.imgUrl" width="100px">
+                 <img :src="scope.row.imgUrl" style="max-width: 150px;">
+               </el-popover>
+             </template>
+      </el-table-column>
+      <el-table-column label="中药名称" align="center" prop="medicineName" />
+
+      <el-table-column label="排序" align="center" prop="sort" />
+      <el-table-column label="是否生活常见" align="center" prop="isUsual">
+        <template slot-scope="scope">
+          <dict-tag :options="isUsualOptions" :value="scope.row.isUsual"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="归经" align="center" prop="vessel"  show-overflow-tooltip/>
+      <el-table-column label="五味" align="center" prop="flavor"  show-overflow-tooltip/>
+      <el-table-column label="主治疾病" align="center" prop="indication"  show-overflow-tooltip/>
+      <el-table-column label="状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:chineseMedicine:edit']"
+          >修改</el-button>
+          <el-button
+             size="mini"
+             type="text"
+             @click="handledetails(scope.row)"
+             >详情
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:chineseMedicine:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改中药科普管理对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+
+        <el-form-item label="图片" prop="imgUrl">
+          <el-upload
+                      v-model="form.imgUrl"
+                      class="avatar-uploader"
+                      :action="uploadUrl"
+                      :show-file-list="false"
+                      :on-success="handleAvatarSuccess"
+                      :before-upload="beforeAvatarUpload">
+                      <img v-if="form.imgUrl" :src="form.imgUrl" class="avatar" width="200px">
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="中药名称" prop="medicineName">
+          <el-input v-model="form.medicineName" placeholder="请输入中药名称" />
+        </el-form-item>
+        <el-form-item label="拼音" prop="pinyin">
+          <el-input v-model="form.pinyin" placeholder="请输入拼音" />
+        </el-form-item>
+        <el-form-item label="功效概述" prop="pinyin">
+          <el-input v-model="form.actionTitle" placeholder="请输入功效概述" />
+        </el-form-item>
+        <el-form-item label="排序" prop="sort">
+           <el-input-number v-model="form.sort"  :min="0" label="请输入排序"></el-input-number>
+        </el-form-item>
+        <el-form-item label="是否常见">
+          <el-radio-group v-model="form.isUsual">
+            <el-radio
+              v-for="dict in isUsualOptions"
+              :key="dict.dictValue"
+              :label="parseInt(dict.dictValue)"
+            >{{dict.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="归经" prop="vessel">
+          <el-select v-model="form.vessel" placeholder="请选择归经">
+                <el-option
+                    v-for="dict in vesselOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictLabel"
+                  />
+                </el-select>
+        </el-form-item>
+        <el-form-item label="五味" prop="flavor">
+          <el-select v-model="form.flavor" placeholder="请选择五味">
+                <el-option
+                    v-for="dict in flavorOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                  />
+                </el-select>
+        </el-form-item>
+        <el-form-item label="主治疾病" prop="indication">
+          <el-select v-model="form.indication" placeholder="请选择疾病">
+                <el-option
+                    v-for="dict in indicationOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                  />
+                </el-select>
+        </el-form-item>
+        <el-form-item label="药物作用" prop="action">
+           <editor v-model="form.action" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="用药方法" prop="usageMethod">
+           <editor v-model="form.usageMethod" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="注意事项" prop="msg">
+          <editor v-model="form.msg" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="基本信息">
+          <editor v-model="form.descs" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-radio-group v-model="form.status">
+            <el-radio
+              v-for="dict in statusOptions"
+              :key="dict.dictValue"
+              :label="parseInt(dict.dictValue)"
+            >{{dict.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+     <el-drawer
+    	:with-header="false"
+            size="75%"
+             :title="show.title" :visible.sync="show.open">
+         <chineseMedicineDetails  ref="Details" />
+       </el-drawer>
+       <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+             <el-upload
+               ref="upload"
+               :limit="1"
+               accept=".xlsx, .xls"
+               :headers="upload.headers"
+               :action="upload.url + '?updateSupport=' + upload.updateSupport"
+               :disabled="upload.isUploading"
+               :on-progress="handleFileUploadProgress"
+               :on-success="handleFileSuccess"
+               :auto-upload="false"
+               drag
+             >
+               <i class="el-icon-upload"></i>
+               <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+               <div class="el-upload__tip text-center" slot="tip">
+                 <div class="el-upload__tip" slot="tip">
+              <!--     <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据 -->
+                 </div>
+                 <span>仅允许导入xls、xlsx格式文件。</span>
+                 <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+               </div>
+             </el-upload>
+             <div slot="footer" class="dialog-footer">
+               <el-button type="primary" @click="submitFileForm">确 定</el-button>
+               <el-button @click="upload.open = false">取 消</el-button>
+             </div>
+           </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listChineseMedicine, getChineseMedicine, delChineseMedicine, addChineseMedicine, importTemplate,updateChineseMedicine, exportChineseMedicine } from "@/api/store/chineseMedicine";
+import chineseMedicineDetails from '../components/chineseMedicineDetails.vue';
+import {getAllList} from "@/api/store/vessel";
+import { getToken } from "@/utils/auth";
+export default {
+  name: "ChineseMedicine",
+  components: { chineseMedicineDetails},
+  data() {
+    return {
+      show:{
+              open:false,
+            },
+      upload: {
+              // 是否显示弹出层
+              open: false,
+              // 弹出层标题
+              title: "",
+              // 是否禁用上传
+              isUploading: false,
+              // 是否更新已经存在的用户数据
+              updateSupport: 0,
+              // 设置上传的请求头部
+              headers: { Authorization: "Bearer " + getToken() },
+              // 上传的地址
+              url: process.env.VUE_APP_BASE_API + "/his/chineseMedicine/importData"
+            },
+      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
+      baseUrl: process.env.VUE_APP_BASE_API,
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 中药科普管理表格数据
+      chineseMedicineList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 是否生活常见字典
+      isUsualOptions: [],
+      // 状态字典
+      statusOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        medicineName: null,
+        imgUrl: null,
+        sort: null,
+        isUsual: null,
+        action: null,
+        flavor: null,
+        indication: null,
+        descs: null,
+        status: null
+      },
+      // 表单参数
+      form: {},
+      vesselOptions:null,
+      flavorOptions:null,
+      indicationOptions:null,
+      // 表单校验
+      rules: {
+        medicineName: [
+          { required: true, message: "中药名称不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("sys_company_or").then(response => {
+      this.isUsualOptions = response.data;
+    });
+    this.getDicts("sys_company_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("sys_chinese_medicine_flavor").then(response => {
+      this.flavorOptions = response.data;
+    });
+    this.getDicts("sys_indication").then(response => {
+      this.indicationOptions = response.data;
+    });
+    this.getDicts("sys_chinese_medicine_vessel").then(response => {
+      this.vesselOptions = response.data;
+    });
+  },
+  methods: {
+
+    /** 导入按钮操作 */
+        handleImport() {
+          this.upload.title = "导入";
+          this.upload.open = true;
+        },
+        /** 下载模板操作 */
+        importTemplate() {
+          importTemplate().then(response => {
+            this.download(response.msg);
+          });
+        },
+        // 文件上传中处理
+        handleFileUploadProgress(event, file, fileList) {
+          this.upload.isUploading = true;
+        },
+        // 文件上传成功处理
+        handleFileSuccess(response, file, fileList) {
+          this.upload.open = false;
+          this.upload.isUploading = false;
+          this.$refs.upload.clearFiles();
+          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+          this.getList();
+        },
+        // 提交上传文件
+        submitFileForm() {
+          this.$refs.upload.submit();
+        },
+    handledetails(row){
+            this.show.open=true;
+            setTimeout(() => {
+                 this.$refs.Details.getDetails(row.id);
+            }, 1);
+        },
+    handleAvatarSuccess(res, file) {
+        if(res.code==200){
+          this.form.imgUrl=res.url;
+          this.$forceUpdate()
+        }
+        else{
+          this.msgError(res.msg);
+        }
+    },
+    updateText(text){
+          this.form.contents=text
+        },
+    beforeAvatarUpload(file) {
+      const isLt1M = file.size / 1024 / 1024 < 1;
+      if (!isLt1M) {
+        this.$message.error('上传图片大小不能超过 1MB!');
+      }
+      return   isLt1M;
+    },
+    /** 查询中药科普管理列表 */
+    getList() {
+      this.loading = true;
+      listChineseMedicine(this.queryParams).then(response => {
+        this.chineseMedicineList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        medicineName: null,
+        imgUrl: null,
+        sort: null,
+        isUsual: 0,
+        action: null,
+        flavor: null,
+        indication: null,
+        descs: null,
+        status: 0
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加中药科普管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getChineseMedicine(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改中药科普管理";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateChineseMedicine(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addChineseMedicine(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除中药科普管理编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delChineseMedicine(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有中药科普管理数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportChineseMedicine(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>
+<style>
+    .avatar-uploader .el-upload {
+       border: 1px dashed #d9d9d9;
+       border-radius: 6px;
+       cursor: pointer;
+       position: relative;
+       overflow: hidden;
+     }
+     .avatar-uploader .el-upload:hover {
+       border-color: #409EFF;
+     }
+
+     .avatar-uploader-icon {
+       font-size: 28px;
+       color: #8c939d;
+       width: 150px;
+       height: 150px;
+       line-height: 150px;
+       text-align: center;
+     }
+
+</style>

+ 63 - 0
src/views/store/components/IllnessLibraryDetails.vue

@@ -0,0 +1,63 @@
+<template>
+    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+      <div style="padding: 20px; background-color: #fff;">
+         中医疾病详情
+      </div>
+<div class="contentx" v-if="item!=null">
+        <div class="desct"> 中医疾病信息</div>
+        <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="疾病名称"><span v-if="item!=null">{{item.illnessName}}</span></el-descriptions-item>
+          <el-descriptions-item label="舌脉"><span v-if="item!=null">{{item.tongueVein}}</span></el-descriptions-item>
+          <el-descriptions-item label="治法"><span v-if="item!=null">{{item.therapy}}</span></el-descriptions-item>
+           <el-descriptions-item label="症状"><span v-if="item!=null">{{item.symptom}}</span></el-descriptions-item>
+          <el-descriptions-item label="方剂名称"><span v-if="item!=null">{{item.formulaName}}</span></el-descriptions-item>
+          <el-descriptions-item label="方剂详情"><span v-if="item!=null">{{item.formulaDescs}}</span></el-descriptions-item>
+        </el-descriptions>
+    </div>
+    </div>
+</template>
+
+<script>
+import { listillnessLibrary, getillnessLibrary, delillnessLibrary, addillnessLibrary, updateillnessLibrary, exportillnessLibrary } from "@/api/store/illnessLibrary";
+  export default {
+    name: "IllnessLibrary",
+    props:["data"],
+    data() {
+      return {
+        item:null,
+      }
+    },
+    created() {
+    },
+    methods: {
+      getDetails(orderId) {
+        this.item=null;
+        getillnessLibrary(orderId).then(response => {
+            this.item = response.data;
+        });
+      },
+    }
+  }
+</script>
+<style>
+  .contentx{
+      height: 100%;
+      background-color: #fff;
+      padding: 0px 20px 20px;
+      margin: 20px;
+  }
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  .el-descriptions-item__content {
+    max-width: 150px;
+    min-width: 100px;
+  }
+  .desct{
+      padding-top: 20px;
+      padding-bottom: 20px;
+      color: #524b4a;
+      font-weight: bold;
+    }
+
+</style>

+ 84 - 0
src/views/store/components/chineseMedicineDetails.vue

@@ -0,0 +1,84 @@
+<template>
+    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+      <div style="padding: 20px; background-color: #fff;">
+         中医科普详情
+      </div>
+<div class="contentx" v-if="item!=null">
+        <div class="desct"> 中医科普信息</div>
+        <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="图片" >
+            <el-image
+                    style="width: 100px"
+                    :src="item.imgUrl"
+                    :preview-src-list="[item.imgUrl]">
+            </el-image>
+          </el-descriptions-item>
+          <el-descriptions-item label="中药名称"><span v-if="item!=null">{{item.medicineName}}</span></el-descriptions-item>
+          <el-descriptions-item label="排序"><span v-if="item!=null">{{item.sort}}</span></el-descriptions-item>
+          <el-descriptions-item label="状态"><span v-if="item!=null"> <dict-tag :options="statusOptions" :value="item.status"/></span></el-descriptions-item>
+          <el-descriptions-item label="是否常见"><span v-if="item!=null"><dict-tag :options="isUsualOptions" :value="item.isUsual"/></span></el-descriptions-item>
+          <el-descriptions-item label="归经"><span v-if="item!=null">{{item.vessel}}</span></el-descriptions-item>
+          <el-descriptions-item label="五味"span="3"><span v-if="item!=null">{{item.flavor}}</span></el-descriptions-item>
+          <el-descriptions-item label="药物作用"span="3"><span v-if="item!=null"><span v-html="item.action"></span></span></el-descriptions-item>
+          <el-descriptions-item label="用药方法" span="3"><span v-if="item!=null"> <span v-html="item.usageMethod"></span></span></el-descriptions-item>
+          <el-descriptions-item label="基本信息" span="3"><span v-if="item!=null"> <span v-html="item.descs"></span></span></el-descriptions-item>
+          <el-descriptions-item label="注意事项" span="3"><span v-if="item!=null"> <span v-html="item.msg"></span></span></el-descriptions-item>
+        </el-descriptions>
+    </div>
+
+
+    </div>
+</template>
+
+<script>
+import { listChineseMedicine, getChineseMedicine, delChineseMedicine, addChineseMedicine, updateChineseMedicine, exportChineseMedicine } from "@/api/store/chineseMedicine";
+  export default {
+    name: "coupon",
+    data() {
+      return {
+        item:null,
+      }
+    },
+    created() {
+      this.getDicts("sys_company_or").then(response => {
+        this.isUsualOptions = response.data;
+      });
+      this.getDicts("sys_company_status").then(response => {
+        this.statusOptions = response.data;
+      });
+    },
+    methods: {
+      getDetails(orderId) {
+        this.item=null;
+        getChineseMedicine(orderId).then(response => {
+            this.item = response.data;
+        
+        });
+      },
+    }
+  }
+</script>
+<style>
+  .contentx{
+      height: 100%;
+      background-color: #fff;
+      padding: 0px 20px 20px;
+
+
+      margin: 20px;
+  }
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  .el-descriptions-item__content {
+    max-width: 150px;
+    min-width: 100px;
+  }
+  .desct{
+      padding-top: 20px;
+      padding-bottom: 20px;
+      color: #524b4a;
+      font-weight: bold;
+    }
+
+</style>

+ 119 - 0
src/views/store/components/departmentDetails.vue

@@ -0,0 +1,119 @@
+<template>
+<div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+    <div style="padding: 20px; background-color: #fff;">
+      科室详情
+    </div>
+<div class="contentx" v-if="item!=null">
+      <div class="desct">
+        科室信息
+      </div>
+
+        <el-descriptions title="" :column="3" border>
+            <el-descriptions-item label="科室名称" >
+                <span v-if="item!=null">{{item.deptName}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="科室编码" >
+                <span v-if="item!=null">{{item.deptCode}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="图标" >
+              <el-popover
+                placement="right"
+                title=""
+                trigger="hover">
+                <img slot="reference" :src="item.iconUrl" width="50px">
+                <img :src="item.iconUrl" style="max-width: 150px;">
+              </el-popover>
+
+            </el-descriptions-item>
+            <el-descriptions-item label="排序" >
+                <span v-if="item!=null">{{item.sort}}</span>
+            </el-descriptions-item>
+
+            <el-descriptions-item label="状态" >
+             <span v-if="item!=null">
+                   <dict-tag :options="statusOptions" :value="item.status"/>
+             </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="是否推荐" >
+             <span v-if="item!=null">
+                   <dict-tag :options="isTuiOptions" :value="item.isTui"/>
+             </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="创建时间" >
+                <span v-if="item!=null">{{item.createTime}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="创建者" >
+                <span v-if="item!=null">{{item.createBy}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="更新时间" >
+                <span v-if="item!=null">{{item.updateTime}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="更新者" >
+                <span v-if="item!=null">{{item.updateBy}}</span>
+            </el-descriptions-item>
+
+
+
+        </el-descriptions>
+    </div>
+    </div>
+</template>
+
+<script>
+  import { listDepartment, getDepartment, delDepartment, addDepartment, updateDepartment, exportDepartment } from "@/api/store/department";
+  export default {
+    name: "depdetails",
+    props:["data"],
+    data() {
+      return {
+        statusOptions: [],
+        isTuiOptions: [],
+        item:null,
+        form: {
+          sreason: '',
+        }
+      }
+    },
+    created() {
+      this.getDicts("sys_company_status").then(response => {
+        this.statusOptions = response.data;
+      });
+      this.getDicts("sys_company_or").then(response => {
+          this.isTuiOptions = response.data;
+        });
+    },
+    methods: {
+      getDetails(orderId) {
+        this.item=null;
+        getDepartment(orderId).then(response => {
+              this.item = response.data;
+        });
+      },
+    }
+  }
+</script>
+<style>
+
+  .contentx{
+      height: 100%;
+      background-color: #fff;
+      padding: 0px 20px 20px;
+
+
+      margin: 20px;
+  }
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  .el-descriptions-item__content {
+    max-width: 150px;
+    min-width: 100px;
+  }
+  .desct{
+      padding-top: 20px;
+      padding-bottom: 20px;
+      color: #524b4a;
+      font-weight: bold;
+    }
+
+</style>

+ 103 - 0
src/views/store/components/diseaseDetails.vue

@@ -0,0 +1,103 @@
+<template>
+  <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+    <div style="padding: 20px; background-color: #fff;">
+      疾病详情
+    </div>
+<div class="contentx" v-if="item!=null">
+      <div class="desct">
+        疾病信息
+      </div>
+        <el-descriptions title="" :column="3" border>
+            <el-descriptions-item label="疾病id"  >
+                <span v-if="item!=null">{{item.diseaseId}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="疾病名称" >
+                <span v-if="item!=null">{{item.diseaseName}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="疾病编号" >
+                <span v-if="item!=null">{{item.diseaseCode}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="所属科室" >
+                <span v-if="item!=null">{{item.deptName}}</span>
+            </el-descriptions-item>
+
+
+            <el-descriptions-item label="状态" >
+             <span v-if="item!=null">
+                   <dict-tag :options="statusOptions" :value="item.status"/>
+             </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="创建时间" >
+                <span v-if="item!=null">{{item.createTime}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="简介" span="6">
+                <span v-if="item!=null">{{item.introduction}}</span>
+            </el-descriptions-item>
+
+            <el-descriptions-item label="诊断" span="6">
+                <span v-if="item!=null">{{item.diagnose}}</span>
+            </el-descriptions-item>
+            <el-descriptions-item label="症状" span="6">
+                      <span v-html="item.symptom"></span>
+
+            </el-descriptions-item>
+            <el-descriptions-item label="检验" span="6">
+                      <span v-html="item.inspect"></span>
+            </el-descriptions-item>
+        </el-descriptions>
+    </div>
+    </div>
+</template>
+
+<script>
+  import {getDisease} from '@/api/store/disease';
+  export default {
+    name: "desdetails",
+    props:["data"],
+    data() {
+      return {
+        statusOptions: [],
+        item:null,
+        form: {
+          sreason: '',
+        }
+      }
+    },
+    created() {
+      this.getDicts("sys_company_status").then(response => {
+        this.statusOptions = response.data;
+      });
+
+    },
+    methods: {
+      getDetails(orderId) {
+          this.item=null;
+          getDisease(orderId).then(response => {
+              this.item = response.data;
+          });
+      },
+    }
+  }
+</script>
+<style>
+
+ .contentx{
+      height: 100%;
+      background-color: #fff;
+      padding: 0px 20px 20px;
+      margin: 20px;
+  }
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  .el-descriptions-item__content {
+    max-width: 150px;
+    min-width: 100px;
+  }
+  .desct{
+      padding-top: 20px;
+      padding-bottom: 20px;
+      color: #524b4a;
+      font-weight: bold;
+    }
+</style>

+ 119 - 0
src/views/store/components/doctorArticleDetails.vue

@@ -0,0 +1,119 @@
+<template>
+  <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+    <div style="padding: 20px; background-color: #fff;">
+      文章详情
+    </div>
+    <div class="content" >
+      <div class="desct">
+        文章信息
+      </div>
+      <el-descriptions title="" :column="3" border>
+        <el-descriptions-item label="文章ID"  >
+            <span v-if="item!=null">{{item.articleId}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="封面图" >
+          <el-popover v-if="item!=null"
+            placement="right"
+            title=""
+            trigger="hover">
+            <img slot="reference" :src="item.imageUrl" width="50px">
+            <img :src="item.imageUrl" style="max-width: 150px;">
+          </el-popover>
+        </el-descriptions-item>
+        <el-descriptions-item label="分类" >
+            <dict-tag v-if="item!=null" :options="cateStatus" :value="item.cateId"/>
+        </el-descriptions-item>
+        <el-descriptions-item label="标题" >
+            <span v-if="item!=null">{{item.title}}</span>
+        </el-descriptions-item>
+
+        <el-descriptions-item label="浏览量" >
+            <span v-if="item!=null">{{item.views}}</span>
+        </el-descriptions-item>
+
+        <el-descriptions-item label="状态" >
+        <span v-if="item!=null">
+              <dict-tag :options="articleStatus" :value="item.status"/>
+        </span>
+        </el-descriptions-item>
+        <el-descriptions-item label="创建时间" >
+            <span v-if="item!=null">{{item.createTime}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="更新时间" >
+            <span v-if="item!=null">{{item.updateTime}}</span>
+        </el-descriptions-item>
+        <el-descriptions-item label="内容" >
+            <span v-if="item!=null" v-html="item.content"></span>
+        </el-descriptions-item>
+      </el-descriptions>
+    </div>
+    <div class="content" v-if="item!=null">
+      <div class="desct">
+        视频内容
+      </div>
+      <div style="display: flex; justify-content: center; align-items: center;">
+          <div style="display: grid; place-items: center;">
+             <video  :src="item.videoUrl" controls style="max-width: 400px; max-height: 400px;"></video>
+          </div>
+      </div>                         
+    </div>
+  </div>
+</template>
+
+<script>
+  import {getArticle} from "@/api/store/doctorArticle";
+  export default {
+    name: "articledetails",
+    props:["data"],
+    data() {
+      return {
+        cateStatus: [],
+        articleStatus: [],
+        statusOptions: [],
+        item:null,
+      }
+    },
+    created() {
+      this.getDicts("sys_doctor_article_cate").then(response => {
+        this.cateStatus = response.data;
+      });
+      this.getDicts("sys_doctor_article_status").then(response => {
+        this.articleStatus = response.data;
+      });
+      this.getDicts("sys_company_status").then(response => {
+        this.statusOptions = response.data;
+      });
+    },
+    methods: {
+      getDetails(orderId) {
+          this.item=null;
+          getArticle(orderId).then(response => {
+              this.item = response.data;
+          });
+      },
+    }
+  }
+</script>
+<style>
+
+  .el-descriptions-item__content {
+    max-width: 150px;
+    min-width: 100px;
+  }
+  .content{
+      height: 100%;
+      background-color: #fff;
+      padding: 0px 20px 20px;
+
+      margin: 20px;
+  }
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  .desct{
+      padding-top: 20px;
+      padding-bottom: 20px;
+      color: #524b4a;
+      font-weight: bold;
+    }
+</style>

+ 90 - 0
src/views/store/components/famousPrescribeDetails.vue

@@ -0,0 +1,90 @@
+<template>
+    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+      <div style="padding: 20px; background-color: #fff;">
+         经典名方详情
+      </div>
+<div class="contentx" v-if="item!=null">
+        <div class="desct"> 经典名方信息</div>
+        <el-descriptions title="" :column="3" border>
+          <<el-descriptions-item label="图片" >
+              <el-image
+                      style="width: 100px"
+                      :src="item.imgUrl"
+                      :preview-src-list="[item.imgUrl]">
+              </el-image>
+            </el-descriptions-item>
+          <el-descriptions-item label="经典名方名称"><span v-if="item!=null">{{item.prescribeName}}</span></el-descriptions-item>
+          <el-descriptions-item label="排序"><span v-if="item!=null">{{item.sort}}</span></el-descriptions-item>
+          <el-descriptions-item label="状态"><span v-if="item!=null"> <dict-tag :options="statusOptions" :value="item.status"/></span></el-descriptions-item>
+          <el-descriptions-item label="方剂类型"><span v-if="item!=null"> <dict-tag :options="prescribeTypeOptions" :value="item.prescribeType"/></span></el-descriptions-item>
+           <el-descriptions-item label="主治疾病"><span v-if="item!=null">{{item.indication}}</span></el-descriptions-item>
+          <el-descriptions-item label="归属书籍" span="3"><span v-if="item!=null">{{item.belongBook}}</span></el-descriptions-item>
+          <el-descriptions-item label="药物作用"span="3"><span v-if="item!=null"><span v-html="item.action"></span></span></el-descriptions-item>
+          <el-descriptions-item label="用药方法" span="3"><span v-if="item!=null"> <span v-html="item.usageMethod"></span></span></el-descriptions-item>
+          <el-descriptions-item label="基本信息" span="3"><span v-if="item!=null"> <span v-html="item.descs"></span></span></el-descriptions-item>
+          <el-descriptions-item label="注意事项" span="3"><span v-if="item!=null"> <span v-html="item.msg"></span></span></el-descriptions-item>
+          <el-descriptions-item label="创建时间"><span v-if="item!=null">{{item.createTime}}</span></el-descriptions-item>
+
+        </el-descriptions>
+    </div>
+
+
+    </div>
+</template>
+
+<script>
+import { listFamousPrescribe, getFamousPrescribe, delFamousPrescribe, addFamousPrescribe, updateFamousPrescribe, exportFamousPrescribe } from "@/api/store/famousPrescribe";
+  export default {
+    name: "prescribeName",
+    data() {
+      return {
+        // 方剂类型字典
+        prescribeTypeOptions: [],
+        // 状态字典
+        statusOptions: [],
+        item:null,
+      }
+    },
+    created() {
+        this.getDicts("sys_famous_prescribe_type").then(response => {
+          this.prescribeTypeOptions = response.data;
+        });
+        this.getDicts("sys_company_status").then(response => {
+          this.statusOptions = response.data;
+        });
+    },
+    methods: {
+      getDetails(orderId) {
+        this.item=null;
+        getFamousPrescribe(orderId).then(response => {
+            this.item = response.data;
+
+        });
+      },
+    }
+  }
+</script>
+<style>
+  .contentx{
+      height: 100%;
+      background-color: #fff;
+      padding: 0px 20px 20px;
+
+
+      margin: 20px;
+  }
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  .el-descriptions-item__content {
+    max-width: 150px;
+    min-width: 100px;
+  }
+  .desct{
+      padding-top: 20px;
+      padding-bottom: 20px;
+      color: #524b4a;
+      font-weight: bold;
+    }
+
+</style>

+ 80 - 0
src/views/store/components/medicatedFoodDetails.vue

@@ -0,0 +1,80 @@
+<template>
+    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+      <div style="padding: 20px; background-color: #fff;">
+         药膳详情
+      </div>
+<div class="contentx" v-if="item!=null">
+        <div class="desct"> 药膳信息</div>
+        <el-descriptions title="" :column="3" border>
+          <<el-descriptions-item label="图片" >
+              <el-image
+                      style="width: 100px"
+                      :src="item.imgUrl"
+                      :preview-src-list="[item.imgUrl]">
+              </el-image>
+            </el-descriptions-item>
+          <el-descriptions-item label="药膳名称"><span v-if="item!=null">{{item.foodName}}</span></el-descriptions-item>
+          <el-descriptions-item label="排序"><span v-if="item!=null">{{item.sort}}</span></el-descriptions-item>
+           <el-descriptions-item label="功效"><span v-if="item!=null">{{item.action}}</span></el-descriptions-item>
+          <el-descriptions-item label="食材"><span v-if="item!=null">{{item.food}}</span></el-descriptions-item>
+
+          <el-descriptions-item label="创建时间"><span v-if="item!=null">{{item.createTime}}</span></el-descriptions-item>
+          <el-descriptions-item label="状态"><span v-if="item!=null"> <dict-tag :options="statusOptions" :value="item.status"/></span></el-descriptions-item>
+          <el-descriptions-item label="主治疾病" span="3"><span v-if="item!=null" >{{item.indications}}</span></el-descriptions-item>
+          <el-descriptions-item label="描述" span="3"><span v-if="item!=null" > <span v-html="item.descs"></span></span></el-descriptions-item>
+        </el-descriptions>
+    </div>
+
+
+    </div>
+</template>
+
+<script>
+import { listMedicatedFood, getMedicatedFood, delMedicatedFood, addMedicatedFood, updateMedicatedFood, exportMedicatedFood } from "@/api/store/medicatedFood";
+  export default {
+    name: "MedicatedFoodDetails",
+    data() {
+      return {
+        item:null,
+      }
+    },
+    created() {
+        this.getDicts("sys_company_status").then(response => {
+          this.statusOptions = response.data;
+        });
+    },
+    methods: {
+      getDetails(orderId) {
+        this.item=null;
+        getMedicatedFood(orderId).then(response => {
+            this.item = response.data;
+       
+        });
+      },
+    }
+  }
+</script>
+<style>
+  .contentx{
+      height: 100%;
+      background-color: #fff;
+      padding: 0px 20px 20px;
+
+
+      margin: 20px;
+  }
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  .el-descriptions-item__content {
+    max-width: 150px;
+    min-width: 100px;
+  }
+  .desct{
+      padding-top: 20px;
+      padding-bottom: 20px;
+      color: #524b4a;
+      font-weight: bold;
+    }
+
+</style>

+ 109 - 0
src/views/store/components/testReportDetails.vue

@@ -0,0 +1,109 @@
+<template>
+    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+      <div style="padding: 20px; background-color: #fff;">
+         测试报告详情
+      </div>
+  <div class="contentx" v-if="item!=null">
+        <div class="desct"> 测试报告信息</div>
+        <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="报告编号"><span v-if="item!=null">{{item.reportSn}}</span></el-descriptions-item>
+          <el-descriptions-item label="用户昵称"><span v-if="item!=null">{{item.nickName}}</span></el-descriptions-item>
+          <el-descriptions-item label="用户电话"><span v-if="item!=null">{{item.phone}}</span></el-descriptions-item>
+          <el-descriptions-item label="诊断结果"><span v-if="item!=null">{{item.testResult}}</span></el-descriptions-item>
+          <el-descriptions-item label="分数"><span v-if="item!=null">{{item.score}}</span></el-descriptions-item>
+          <el-descriptions-item label="模板"><span v-if="item!=null">{{item.name}}</span></el-descriptions-item>
+          <el-descriptions-item label="备注"><span v-if="item!=null">{{item.remark}}</span></el-descriptions-item>
+          <el-descriptions-item label="创建时间"><span v-if="item!=null">{{item.createTime}}</span></el-descriptions-item>
+        </el-descriptions>
+  </div>
+  <div class="contentx" v-if="patientJson!=null">
+        <div class="desct" > 患者信息</div>
+        <el-descriptions title="" :column="3" border >
+            <el-descriptions-item label="患者名称"><span >{{patientJson.name}}</span></el-descriptions-item>
+            <el-descriptions-item label="患者性别">
+              <dict-tag :options="sexOptions" :value="patientJson.sex"/>
+        </el-descriptions-item>
+            <el-descriptions-item label="患者年龄"><span >{{patientJson.age}}</span></el-descriptions-item>
+        </el-descriptions>
+  </div>
+  <div class="contentx" v-if="conditioningPlanJson!=null">
+        <div class="desct"> 调理方案</div>
+        <el-descriptions title="" :column="1" border >
+            <el-descriptions-item :label="form.name" v-for=" form in conditioningPlanJson" ><span >{{form.value}}</span></el-descriptions-item>
+        </el-descriptions>
+  </div>
+  <div class="contentx" v-if="formJson!=null">
+        <div class="desct"> 表单信息</div>
+        <el-descriptions title="" :column="3" border >
+            <el-descriptions-item :label="form.title" v-for=" form in formJson" ><span >{{form.option}}</span></el-descriptions-item>
+        </el-descriptions>
+  </div>
+</div>
+</template>
+
+<script>
+import { listTestReport, getTestReport, delTestReport, addTestReport, updateTestReport, exportTestReport } from "@/api/store/testReport";
+  export default {
+    name: "testReport",
+    props:["data"],
+    data() {
+      return {
+        item:null,
+        formJson:null,
+        conditioningPlanJson:null,
+        patientJson:null,
+        sexOptions:[],
+      }
+    },
+    created() {
+      this.getDicts("sys_patient_sex").then(response => {
+         this.sexOptions = response.data;
+       });
+    },
+    methods: {
+      getDetails(orderId) {
+        this.item=null;
+        this.conditioningPlanJson=null;
+        this.formJson=null;
+        this.patientJson=null;
+        getTestReport(orderId).then(response => {
+            this.item = response.data;
+            if(response.data.formJson!=null){
+              this.formJson=JSON.parse(response.data.formJson);
+              console.log(this.formJson)
+            };
+            if(response.data.conditioningPlanJson!=null){
+              this.conditioningPlanJson=JSON.parse(response.data.conditioningPlanJson)
+            };
+            if(response.data.patientJson!=null){
+              this.patientJson=JSON.parse(response.data.patientJson)
+            };
+        });
+      },
+    }
+  }
+</script>
+<style>
+  .contentx{
+      height: 100%;
+      background-color: #fff;
+      padding: 0px 20px 20px;
+
+
+      margin: 20px;
+  }
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  .el-descriptions-item__content {
+    max-width: 500px;
+    min-width: 100px;
+  }
+  .desct{
+      padding-top: 20px;
+      padding-bottom: 20px;
+      color: #524b4a;
+      font-weight: bold;
+    }
+
+</style>

+ 108 - 0
src/views/store/components/testTempDetails.vue

@@ -0,0 +1,108 @@
+<template>
+
+  <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+    <div style="padding: 20px; background-color: #fff;">
+      测一测模板详情
+    </div>
+
+<div class="content" v-if="item!=null">
+    <div class="desct">
+      测一测模板信息
+    </div>
+    <el-descriptions title="" :column="3" border>
+    <el-descriptions-item label="名称" >
+        <span v-if="item!=null">{{item.name}}</span>
+    </el-descriptions-item>
+    <el-descriptions-item label="模板编号" >
+        <span v-if="item!=null">{{item.tempCode}}</span>
+    </el-descriptions-item>
+    <el-descriptions-item label="状态" >
+         <dict-tag :options="statusOptions" :value="item.status"/>
+    </el-descriptions-item>
+
+    <el-descriptions-item label="创建时间" >
+        <span v-if="item!=null">{{item.createTime}}</span>
+    </el-descriptions-item>
+    <el-descriptions-item label="修改时间" >
+        <span v-if="item!=null">{{item.updateTime}}</span>
+    </el-descriptions-item>
+    </el-descriptions>
+  </div>
+<div class="content" v-for="mb in itemTypeJson">
+    <div class="desct">
+      {{mb.itemType}}
+    </div>
+    <el-table :data="mb.item" :cell-style="{ textAlign: 'center' }" :header-cell-style="{textAlign: 'center'}">
+      <el-table-column label="名称" prop="name" width="200px">
+        <template slot-scope="scope">
+          {{ scope.row.name }}
+        </template>
+      </el-table-column>
+      <el-table-column label="内容" prop="value" >
+        <template slot-scope="scope">
+          <div style="white-space: pre-wrap;">
+            {{ scope.row.value }}
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+
+      </div>
+</template>
+
+<script>
+import { listTestTemp, getTestTemp, delTestTemp, addTestTemp, updateTestTemp, exportTestTemp } from "@/api/store/testTemp";
+  export default {
+    name: "testTempDetails",
+    props:["data"],
+    data() {
+      return {
+       // 状态字典
+       statusOptions: [],
+       itemTypeJson:[],
+        item:null,
+      }
+    },
+    created() {
+    this.getDicts("sys_company_status").then(response => {
+      this.statusOptions = response.data;
+    });
+
+    },
+    methods: {
+      getDetails(orderId) {
+          this.item=null;
+          getTestTemp(orderId).then(response => {
+              this.item = response.data;
+              this.itemTypeJson=  JSON.parse(this.item.itemTypeJson)
+          });
+      },
+
+    }
+  }
+</script>
+<style>
+  .el-descriptions-item__content {
+    max-width: 150px;
+    min-width: 100px;
+  }
+  .content{
+      height: 100%;
+      background-color: #fff;
+     padding: 0px 20px 20px;
+
+      margin: 20px;
+  }
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  .desct{
+      padding-top: 20px;
+      padding-bottom: 20px;
+      color: #524b4a;
+      font-weight: bold;
+    }
+</style>
+
+

+ 116 - 0
src/views/store/components/testTempItemDetails.vue

@@ -0,0 +1,116 @@
+<template>
+
+  <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+    <div style="padding: 20px; background-color: #fff;">
+      测一测模板项目详情
+    </div>
+
+<div class="content" v-if="item!=null">
+    <div class="desct">
+      测一测模板项目信息
+    </div>
+    <el-descriptions title="" :column="3" border>
+    <el-descriptions-item label="标题" >
+        <span v-if="item!=null">{{item.title}}</span>
+    </el-descriptions-item>
+    <el-descriptions-item label="模板名称" >
+        <span v-if="item!=null">{{name}}</span>
+    </el-descriptions-item>
+    <el-descriptions-item label="项目类型" >
+         <dict-tag :options="itemTypeOptions" :value="item.tempId"/>
+    </el-descriptions-item>
+    <el-descriptions-item label="排序" >
+        <span v-if="item!=null">{{item.sort}}</span>
+    </el-descriptions-item>
+    <el-descriptions-item label="创建时间" >
+        <span v-if="item!=null">{{item.createTime}}</span>
+    </el-descriptions-item>
+    <el-descriptions-item label="修改时间" >
+        <span v-if="item!=null">{{item.updateTime}}</span>
+    </el-descriptions-item>
+        </el-descriptions>
+            </div>
+            <div class="content" v-if="item!=null">
+<div class="desct">
+  详情
+</div>
+
+  <el-table :data="scoreJson" :cell-style="{ textAlign: 'center' }" :header-cell-style="{textAlign: 'center'}">
+    <el-table-column label="标题" prop="name" >
+      <template slot-scope="scope">
+        {{ scope.row.name }}
+      </template>
+    </el-table-column>
+    <el-table-column label="分值" prop="score" >
+      <template slot-scope="scope">
+        {{ scope.row.score }}
+      </template>
+    </el-table-column>
+  </el-table>
+
+
+      </div>
+
+      </div>
+</template>
+
+<script>
+import { listTestTempItem, getTestTempItem, delTestTempItem, addTestTempItem, updateTestTempItem, exportTestTempItem } from "@/api/store/testTempItem";
+import { getAllTestTemp } from "@/api/store/testTemp";
+  export default {
+    name: "patientdetails",
+    props:["data"],
+    data() {
+      return {
+       // 状态字典
+       itemTypeOptions: [],
+        item:null,
+        scoreJson:[],
+        TempList:[],
+        name:null,
+      }
+    },
+    created() {
+     this.getDicts("test_temp_item_type").then(response => {
+       this.itemTypeOptions = response.data;
+     });
+
+    },
+    methods: {
+
+      getDetails(orderId,name) {
+          this.name=name;
+          this.item=null;
+          getTestTempItem(orderId).then(response => {
+              this.item = response.data;
+              this.scoreJson=JSON.parse(response.data.scoreJson);
+          });
+      },
+
+    }
+  }
+</script>
+<style>
+  .el-descriptions-item__content {
+    max-width: 150px;
+    min-width: 100px;
+  }
+  .content{
+      height: 100%;
+      background-color: #fff;
+     padding: 0px 20px 20px;
+
+      margin: 20px;
+  }
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  .desct{
+      padding-top: 20px;
+      padding-bottom: 20px;
+      color: #524b4a;
+      font-weight: bold;
+    }
+</style>
+
+

+ 80 - 0
src/views/store/components/vesselDetails.vue

@@ -0,0 +1,80 @@
+<template>
+    <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+      <div style="padding: 20px; background-color: #fff;">
+         筋络详情
+      </div>
+<div class="contentx" v-if="item!=null">
+        <div class="desct"> 筋络信息</div>
+        <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="图片" >
+            <el-image
+                    style="width: 100px"
+                    :src="item.imgUrl"
+                    :preview-src-list="[item.imgUrl]">
+            </el-image>
+          </el-descriptions-item>
+          <el-descriptions-item label="请输入筋络穴位名称"><span v-if="item!=null">{{item.vesselName}}</span></el-descriptions-item>
+          <el-descriptions-item label="排序"><span v-if="item!=null">{{item.sort}}</span></el-descriptions-item>
+           <el-descriptions-item label="经络"><span v-if="item!=null">{{item.vessel}}</span></el-descriptions-item>
+          <el-descriptions-item label="部位"><span v-if="item!=null">{{item.region}}</span></el-descriptions-item>
+
+          <el-descriptions-item label="状态"><span v-if="item!=null"> <dict-tag :options="statusOptions" :value="item.status"/></span></el-descriptions-item>
+          <el-descriptions-item label="创建时间"><span v-if="item!=null">{{item.createTime}}</span></el-descriptions-item>
+          <el-descriptions-item label="描述"><span  v-if="item!=null" v-html="item.descs" ></span></el-descriptions-item>
+        </el-descriptions>
+    </div>
+
+
+    </div>
+</template>
+
+<script>
+import { listVessel, getVessel, delVessel, addVessel, updateVessel, exportVessel } from "@/api/store/vessel";
+  export default {
+    name: "getVessel",
+    data() {
+      return {
+        item:null,
+        // 状态字典
+        statusOptions: [],
+      }
+    },
+    created() {
+      this.getDicts("sys_company_status").then(response => {
+        this.statusOptions = response.data;
+      });
+    },
+    methods: {
+      getDetails(orderId) {
+        this.item=null;
+        getVessel(orderId).then(response => {
+            this.item = response.data;
+        });
+      },
+    }
+  }
+</script>
+<style>
+  .contentx{
+      height: 100%;
+      background-color: #fff;
+      padding: 0px 20px 20px;
+
+
+      margin: 20px;
+  }
+  .el-descriptions-item__label.is-bordered-label{
+    font-weight: normal;
+  }
+  .el-descriptions-item__content {
+    max-width: 150px;
+    min-width: 100px;
+  }
+  .desct{
+      padding-top: 20px;
+      padding-bottom: 20px;
+      color: #524b4a;
+      font-weight: bold;
+    }
+
+</style>

+ 442 - 0
src/views/store/department/index.vue

@@ -0,0 +1,442 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="科室名称" prop="deptName">
+        <el-input
+          v-model="queryParams.deptName"
+          placeholder="请输入科室名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="科室编码" prop="deptCode">
+        <el-input
+          v-model="queryParams.deptCode"
+          placeholder="请输入科室编码"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+   <el-select v-model="queryParams.status" placeholder="状态" clearable size="small">
+     <el-option
+       v-for="dict in statusOptions"
+       :key="dict.dictValue"
+       :label="dict.dictLabel"
+       :value="dict.dictValue"
+     />
+   </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:department:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['his:department:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:department:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:department:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table height="660" v-loading="loading" border :data="departmentList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="科室名称" align="center" prop="deptName" />
+      <el-table-column label="科室编码" align="center" prop="deptCode" />
+      <el-table-column label="图标" align="center" >
+        <template slot-scope="scope">
+           <el-popover v-if="scope.row.iconUrl!=null"
+                      placement="right"
+                      title=""
+                      trigger="hover">
+                      <img slot="reference" :src="scope.row.iconUrl" width="50px">
+                      <img :src="scope.row.iconUrl" style="max-width: 250px;">
+            </el-popover>
+        </template>
+      </el-table-column>
+      <el-table-column label="排序" align="center" prop="sort" />
+      <el-table-column label="状态" align="center" >
+    <template slot-scope="scope">
+      <dict-tag :options="statusOptions" :value="scope.row.status"/>
+    </template>
+      </el-table-column>
+      <el-table-column label="是否推荐" align="center" >
+      <template slot-scope="scope">
+        <dict-tag :options="isTuiOptions" :value="scope.row.isTui"/>
+      </template>
+        </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:department:edit']"
+          >修改</el-button>
+
+          <el-button
+            size="mini"
+            type="text"
+            @click="handledetails(scope.row)"
+            v-hasPermi="['his:disease:details']"
+          >详情</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:department:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改科室对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :rules="rules">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="科室名称" prop="deptName">
+          <el-input v-model="form.deptName" placeholder="请输入科室名称" />
+        </el-form-item>
+        <el-form-item label="科室编码" prop="deptCode">
+          <el-input v-model="form.deptCode" placeholder="请输入科室编码" />
+        </el-form-item>
+        <el-form-item label="图标" prop="iconUrl">
+          <el-upload
+            v-model="form.iconUrl"
+            class="avatar-uploader"
+            :action="uploadUrl"
+            :show-file-list="false"
+            :on-success="handleAvatarSuccess"
+            :before-upload="beforeAvatarUpload">
+            <img v-if="form.iconUrl" :src="form.iconUrl" class="avatar" width="200px">
+            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="排序" prop="sort">
+            <el-input-number v-model="form.sort"  :min="0" label="描述文字"></el-input-number>
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-radio-group v-model="form.status">
+                   <el-radio :label="item.dictValue" v-for="item in statusOptions" >{{item.dictLabel}}</el-radio>
+          </el-radio-group>
+
+        </el-form-item>
+        <el-form-item label="是否推荐" prop="status">
+            <el-radio-group v-model="form.isTui">
+                     <el-radio :label="item.dictValue" v-for="item in isTuiOptions" >{{item.dictLabel}}</el-radio>
+            </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-drawer
+        :with-header="false"
+        size="75%"
+         :title="show.title" :visible.sync="show.open">
+     <departmentDetails  ref="departmentDetails" />
+       </el-drawer>
+
+
+  </div>
+</template>
+
+<script>
+import { listDepartment, getDepartment, delDepartment, addDepartment, updateDepartment, exportDepartment } from "@/api/store/department";
+import departmentDetails from '../components/departmentDetails.vue';
+export default {
+  name: "Department",
+   components: { departmentDetails },
+  data() {
+    return {
+      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
+      baseUrl: process.env.VUE_APP_BASE_API,
+   show:{
+        title:"科室详情",
+        open:false,
+      },
+       statusOptions: [],
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 科室表格数据
+      departmentList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        deptName: null,
+        deptCode: null,
+        iconUrl: null,
+        sort: null,
+        status: null
+      },
+       isTuiOptions: [],
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        deptName: [
+          { required: true, message: "科室名称不能为空", trigger: "blur" }
+        ],
+        deptCode: [
+          { required: true, message: "科室编码不能为空", trigger: "blur" }
+        ],
+        sort: [
+          { required: true, message: "排序不能为空", trigger: "blur" }
+        ],
+        status: [
+          { required: true, message: "状态不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("sys_company_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("sys_company_or").then(response => {
+        this.isTuiOptions = response.data;
+      });
+  },
+  methods: {
+    handleAvatarSuccess(res, file) {
+        if(res.code==200){
+          this.form.iconUrl=res.url;
+          self.$forceUpdate()
+        }
+        else{
+          this.msgError(res.msg);
+        }
+    },
+    beforeAvatarUpload(file) {
+      const isLt1M = file.size / 1024 / 1024 < 1;
+      if (!isLt1M) {
+        this.$message.error('上传图片大小不能超过 1MB!');
+      }
+      return   isLt1M;
+    },
+
+
+
+
+    /** 查询科室列表 */
+    getList() {
+            console.log(this.statusOptions)
+      this.loading = true;
+      listDepartment(this.queryParams).then(response => {
+        this.departmentList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        deptId: null,
+        deptName: null,
+        deptCode: null,
+        iconUrl: null,
+        sort: null,
+        createTime: null,
+        createBy: null,
+        updateTime: null,
+        updateBy: null,
+        status: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.deptId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加科室";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const deptId = row.deptId || this.ids
+      getDepartment(deptId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改科室";
+        this.form.status = String(this.form.status)
+         this.form.isTui = String(this.form.isTui)
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.deptId != null) {
+            updateDepartment(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addDepartment(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const deptIds = row.deptId || this.ids;
+      this.$confirm('是否确认删除科室编号为"' + deptIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delDepartment(deptIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+
+    /** 详情按钮 */
+    handledetails(row){
+
+        this.show.open=true;
+        setTimeout(() => {
+            this.$refs.departmentDetails.getDetails(row.deptId);
+        }, 1);
+
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有科室数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportDepartment(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>
+<style>
+
+  .avatar-uploader .el-upload {
+     border: 1px dashed #d9d9d9;
+     border-radius: 6px;
+     cursor: pointer;
+     position: relative;
+     overflow: hidden;
+   }
+   .avatar-uploader .el-upload:hover {
+     border-color: #409EFF;
+   }
+
+   .avatar-uploader-icon {
+     font-size: 28px;
+     color: #8c939d;
+     width: 150px;
+     height: 150px;
+     line-height: 150px;
+     text-align: center;
+   }
+</style>

+ 419 - 0
src/views/store/disease/index.vue

@@ -0,0 +1,419 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="名称" prop="diseaseName">
+        <el-input
+          v-model="queryParams.diseaseName"
+          placeholder="请输入名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="疾病编码" prop="diseaseCode">
+        <el-input
+          v-model="queryParams.diseaseCode"
+          placeholder="请输入疾病编码"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="科室" prop="deptId">
+       <el-select v-model="queryParams.deptId" placeholder="请选择所属科室">
+         <el-option
+             v-for="dict in depList"
+             :key="dict.dictValue"
+             :label="dict.dictLabel"
+             :value="dict.dictValue"
+           />
+         </el-select>
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+       <el-select v-model="queryParams.status" placeholder="状态" clearable size="small">
+         <el-option
+           v-for="dict in statusOptions"
+           :key="dict.dictValue"
+           :label="dict.dictLabel"
+           :value="dict.dictValue"
+         />
+       </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:disease:add']"
+        >新增</el-button>
+      </el-col>
+
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['his:disease:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:disease:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:disease:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" border :data="diseaseList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="疾病名称" align="center" prop="diseaseName" />
+      <el-table-column label="疾病编码" align="center" prop="diseaseCode" />
+      <el-table-column label="所属科室" align="center" prop="deptName" />
+      <el-table-column label="简介" align="center" prop="introduction" show-overflow-tooltip/>
+      <el-table-column label="诊断" align="center" prop="diagnose" show-overflow-tooltip/>
+      <el-table-column label="状态" align="center">
+       <template slot-scope="scope">
+         <dict-tag :options="statusOptions" :value="scope.row.status"/>
+       </template>
+
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:disease:edit']"
+          >修改</el-button>
+
+          <el-button
+            size="mini"
+            type="text"
+            @click="handledetails(scope.row)"
+            v-hasPermi="['his:disease:details']"
+          >详情</el-button>
+
+
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:disease:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改疾病对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body :rules="rules">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="疾病名称" prop="diseaseName">
+          <el-input v-model="form.diseaseName" placeholder="请输入疾病名称" />
+        </el-form-item>
+        <el-form-item label="疾病编码" prop="diseaseCode">
+          <el-input  v-model="form.diseaseCode" placeholder="请输入疾病编码" />
+        </el-form-item>
+        <el-form-item label="所属科室" prop="deptId">
+          <el-select v-model="form.deptId" placeholder="请选择所属科室">
+              <el-option
+                  v-for="dict in depList"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+
+              </el-select>
+        </el-form-item>
+      <el-form-item label="简介">
+          <el-input v-model="form.introduction"  type="textarea"/>
+      </el-form-item>
+      <el-form-item label="诊断">
+        <el-input v-model="form.diagnose"  type="textarea" />
+      </el-form-item>
+     <el-form-item label="症状">
+          <editor v-model="form.symptom" :min-height="292" />
+     </el-form-item>
+
+
+       <el-form-item label="检验">
+           <editor v-model="form.inspect" :min-height="292"/>
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+     <el-select v-model="form.status" placeholder="状态" clearable size="small">
+       <el-option
+         v-for="dict in statusOptions"
+         :key="dict.dictValue"
+         :label="dict.dictLabel"
+         :value="dict.dictValue"
+       />
+     </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+ <el-drawer
+      :with-header="false" 
+     size="75%"
+      :title="show.title" :visible.sync="show.open">
+  <diseaseDetails  ref="diseaseDetails" :data='show'/>
+    </el-drawer>
+
+
+
+  </div>
+</template>
+
+<script>
+import { listDisease, getDisease, delDisease, addDisease, updateDisease, exportDisease ,listDepartment} from "@/api/store/disease";
+import diseaseDetails from '../components/diseaseDetails.vue';
+export default {
+  name: "Disease",
+  components: { diseaseDetails },
+  data() {
+    return {
+      show:{
+        title:"疾病详情",
+        open:false,
+      },
+      //科室列表
+      depList:[],
+      statusOptions: [],
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 疾病表格数据
+      diseaseList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        diseaseName: null,
+        diseaseCode: null,
+        deptId: null,
+        introduction: null,
+        symptom: null,
+        diagnose: null,
+        inspect: null,
+        status: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        diseaseName: [
+          { required: true, message: "疾病名称不能为空", trigger: "blur" }
+        ],
+        diseaseCode: [
+          { required: true, message: "疾病编码不能为空", trigger: "blur" }
+        ],
+        deptId: [
+          { required: true, message: "科室不能为空", trigger: "blur" }
+        ],
+        introduction: [
+          { required: true, message: "简介不能为空", trigger: "blur" }
+        ],
+        status: [
+          { required: true, message: "状态不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("sys_company_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getdeplist();
+  },
+  methods: {
+   /** 查询科室列表 */
+    getdeplist() {
+      listDepartment().then(response => {
+        this.depList = response.rows;
+      });
+    },
+    /** 查询疾病列表 */
+    getList() {
+      this.loading = true;
+       this.queryParams.deptName = null;
+      listDisease(this.queryParams).then(response => {
+        this.diseaseList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        diseaseId: null,
+        diseaseName: null,
+        diseaseCode: null,
+        deptId: null,
+        introduction: null,
+        symptom: null,
+        diagnose: null,
+        inspect: null,
+        status: null,
+        createTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.diseaseId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加疾病";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const diseaseId = row.diseaseId || this.ids
+      getDisease(diseaseId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改疾病";
+        this.form.status = String(this.form.status)
+      });
+    },
+        /** 详情按钮 */
+    handledetails(row){
+        this.show.open=true;
+        setTimeout(() => {
+            this.$refs.diseaseDetails.getDetails(row.diseaseId);
+        }, 1);
+
+    },
+
+
+
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.diseaseId != null) {
+            updateDisease(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addDisease(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const diseaseIds = row.diseaseId || this.ids;
+      this.$confirm('是否确认删除疾病编号为"' + diseaseIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delDisease(diseaseIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有疾病数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportDisease(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 542 - 0
src/views/store/doctorArticle/index.vue

@@ -0,0 +1,542 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" >
+
+      <el-form-item label="分类" prop="cateId">
+        <el-select v-model="queryParams.cateId" placeholder="分类" clearable size="small">
+          <el-option
+            v-for="dict in cateStatus"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="标题" prop="title">
+        <el-input
+          v-model="queryParams.title"
+          placeholder="请输入标题"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+      <el-select v-model="queryParams.status" placeholder="状态" clearable size="small">
+        <el-option
+          v-for="dict in articleStatus"
+          :key="dict.dictValue"
+          :label="dict.dictLabel"
+          :value="dict.dictValue"
+        />
+      </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:article:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['his:article:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:article:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:article:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" border :data="articleList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="封面图" align="center" prop="imageUrl" >
+         <template slot-scope="scope">
+                  <el-popover v-if="scope.row.imageUrl!=null"
+                    placement="right"
+                    title=""
+                    trigger="hover">
+                    <img slot="reference" :src="scope.row.imageUrl" width="50px">
+                    <img :src="scope.row.imageUrl" style="max-width: 150px;">
+                  </el-popover>
+                </template>
+      </el-table-column>
+
+      <el-table-column label="标题" align="center" prop="title" />
+      <el-table-column label="分类" align="center" prop="cateId">
+           <template slot-scope="scope">
+              <dict-tag :options="cateStatus" :value="scope.row.cateId"/>
+            </template>
+      </el-table-column>
+      <el-table-column label="浏览量" align="center" prop="views" />
+      <el-table-column label="状态" align="center" prop="status" >
+        <template slot-scope="scope">
+           <dict-tag :options="articleStatus" :value="scope.row.status"/>
+         </template>
+      </el-table-column>
+      <el-table-column label="创建时间" align="center" prop="createTime" width="150px"/>
+       <el-table-column label="创建时间" align="center" prop="updateTime" width="150px"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150px">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:article:edit']"
+          >修改</el-button>
+
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleDetails(scope.row)"
+            v-hasPermi="['his:article:edit']"
+          >详情</el-button>
+
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:article:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改医生文章对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body :rules="rules">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="分类" prop="cateId">
+          <el-select v-model="form.cateId" placeholder="分类" clearable size="small">
+            <el-option
+              v-for="dict in cateStatus"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="封面图" prop="imageUrl">
+           <el-upload
+                      v-model="form.imageUrl"
+                      class="avatar-uploader"
+                      :action="uploadUrl"
+                      :show-file-list="false"
+                      :on-success="handleImageUrlSuccess"
+                      :before-upload="beforeImageUrlUpload">
+                      <img v-if="form.imageUrl" :src="form.imageUrl" class="avatar" width="200px">
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="标题" prop="title">
+          <el-input v-model="form.title" placeholder="请输入标题" />
+        </el-form-item>
+
+        <el-form-item label="视频地址" prop="videoUrl">
+            <div>
+                <el-upload
+                  ref="upload"
+                  class="upload-demo"
+                  :action="uploadUrl"
+                  :on-success="handleSuccess"
+                  :before-upload="beforeUpload"
+                  :limit="1"
+                  :accept="videoAccept"
+                >
+                  <el-button size="small" type="primary">点击上传视频</el-button>
+                </el-upload>
+                <video v-if="form.videoUrl" :src="form.videoUrl" controls style="max-width: 400px; max-height: 400px;"></video>
+              </div>
+        </el-form-item>
+        <!-- <el-form-item label="作者头像" prop="avatar">
+           <el-upload
+                      v-model="form.avatar"
+                      class="avatar-uploader"
+                      :action="uploadUrl"
+                      :show-file-list="false"
+                      :on-success="handleAvatarSuccess"
+                      :before-upload="beforeAvatarUpload">
+                      <img v-if="form.avatar" :src="form.avatar" class="avatar" width="200px">
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item> -->
+        <el-form-item label="内容" prop="content">
+          <Editor ref="myeditor"   @on-text-change="updateText"/>
+        </el-form-item>
+        <el-form-item label="浏览量" prop="views">
+           <el-input-number v-model="form.views"  :min="0"  label="请输入浏览量"></el-input-number>
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-select v-model="form.status" placeholder="状态" clearable size="small">
+            <el-option
+              v-for="dict in articleStatus"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+
+
+
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+       <el-drawer
+            :with-header="false"
+            size="75%"
+             :title="show.title" :visible.sync="show.open">
+         <articleDetails  ref="articleDetails" />
+           </el-drawer>
+
+  </div>
+</template>
+
+<script>
+import { listArticle, getArticle, delArticle, addArticle, updateArticle, exportArticle } from "@/api/store/doctorArticle";
+import articleDetails from '../components/doctorArticleDetails.vue';
+import Editor from '@/components/Editor/wang';
+export default {
+  name: "Article",
+  components: { articleDetails,Editor },
+  data() {
+    return {
+      videoUrl: "",
+      videoAccept:"video/*",
+      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
+      baseUrl: process.env.VUE_APP_BASE_API,
+      show:{
+              title:"医生文章详情",
+              open:false,
+            },
+      cateStatus: [],
+      articleStatus: [],
+      userName: {name:"1"},
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 医生文章表格数据
+      articleList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        doctorId: null,
+        imageUrl: null,
+        cateId: null,
+        title: null,
+        content: null,
+        views: null,
+        status: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        cateId: [
+          { required: true, message: "分类不能为空", trigger: "blur" }
+        ],
+        title: [
+          { required: true, message: "标题不能为空", trigger: "blur" }
+        ],
+        imageUrl: [
+          { required: true, message: "封面图不能为空", trigger: "blur" }
+        ],
+        content: [
+          { required: true, message: "内容不能为空", trigger: "blur" }
+        ],
+        status: [
+          { required: true, message: "状态不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+
+    this.getList();
+    this.getDicts("sys_doctor_article_cate").then(response => {
+      this.cateStatus = response.data;
+    });
+    this.getDicts("sys_doctor_article_status").then(response => {
+      this.articleStatus = response.data;
+    });
+  },
+  methods: {
+    handleSuccess(response, file) {
+      // 上传成功后的回调函数
+      this.myloading.close();
+      this.form.videoUrl = response.url;
+      this.$refs.upload.clearFiles();
+    },
+    beforeUpload(file) {
+      // 上传前的钩子函数,可以在这里对文件进行处理
+      // 返回 false 则取消上传
+
+      // 例如限制文件大小
+      const isLt2M = file.size / 1024 / 1024 < 200;
+      if (!isLt2M) {
+        this.$message.error('上传视频文件大小不能超过 200MB!');
+        return false;
+      }
+      this.myloading = this.$loading({
+        lock: true,
+        text: '上传中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+
+    },
+
+    updateText(text){
+      this.form.content=text
+    },
+    handleImageUrlSuccess(res, file) {
+      if(res.code==200){
+           this.form.imageUrl=res.url;
+           this.$forceUpdate()
+       }else{
+            this.msgError(res.msg);
+        }
+    },
+    beforeImageUrlUpload(file) {
+       const isLt1M = file.size / 1024 / 1024 < 1;
+        if (!isLt1M) {
+            this.$message.error('上传图片大小不能超过 1MB!');
+          }
+          return   isLt1M;
+    },
+    handleAvatarSuccess(res, file) {
+      if(res.code==200){
+           this.form.avatar=res.url;
+           this.$forceUpdate()
+       }else{
+            this.msgError(res.msg);
+        }
+    },
+    beforeAvatarUpload(file) {
+       const isLt1M = file.size / 1024 / 1024 < 1;
+        if (!isLt1M) {
+            this.$message.error('上传图片大小不能超过 1MB!');
+          }
+          return   isLt1M;
+    },
+    handleDetails(row){
+        this.show.open=true;
+        setTimeout(() => {
+             this.$refs.articleDetails.getDetails(row.articleId);
+        }, 1);
+    },
+    /** 查询医生文章列表 */
+    getList() {
+      this.loading = true;
+      listArticle(this.queryParams).then(response => {
+        this.articleList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        articleId: null,
+        doctorId: null,
+        imageUrl: null,
+        cateId: null,
+        title: null,
+        content: null,
+        views: null,
+        videoUrl:null,
+        status: null,
+        createTime: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.articleId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加医生文章";
+        setTimeout(() => {
+          this.$refs.myeditor.setText("");
+        }, 100);
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const articleId = row.articleId || this.ids
+      getArticle(articleId).then(response => {
+      this.form = response.data;
+      setTimeout(() => {
+          if(this.form.content==null){
+            this.$refs.myeditor.setText("");
+          }else{
+            this.$refs.myeditor.setText(this.form.content);
+          }
+        }, 1);
+        this.open = true;
+        this.title = "修改医生文章";
+        this.form.status = String(this.form.status)
+        this.form.cateId = String(this.form.cateId)
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.articleId != null) {
+            updateArticle(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addArticle(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const articleIds = row.articleId || this.ids;
+      this.$confirm('是否确认删除医生文章编号为"' + articleIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delArticle(articleIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有医生文章数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportArticle(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>
+<style>
+    .avatar-uploader .el-upload {
+       border: 1px dashed #d9d9d9;
+       border-radius: 6px;
+       cursor: pointer;
+       position: relative;
+       overflow: hidden;
+     }
+     .avatar-uploader .el-upload:hover {
+       border-color: #409EFF;
+     }
+
+     .avatar-uploader-icon {
+       font-size: 28px;
+       color: #8c939d;
+       width: 150px;
+       height: 150px;
+       line-height: 150px;
+       text-align: center;
+     }
+</style>
+
+

+ 594 - 0
src/views/store/famousPrescribe/index.vue

@@ -0,0 +1,594 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="名称" prop="prescribeName">
+        <el-input
+          v-model="queryParams.prescribeName"
+          placeholder="请输入经典名方名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="方剂类型" prop="prescribeType">
+        <el-select v-model="queryParams.prescribeType" placeholder="请选择方剂类型" clearable size="small">
+          <el-option
+            v-for="dict in prescribeTypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="主治疾病" prop="indication">
+        <el-input
+          v-model="queryParams.indication"
+          placeholder="请输入主治疾病"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="创建时间" prop="createTime">
+        <el-date-picker clearable size="small"
+          v-model="queryParams.createTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择创建时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:famousPrescribe:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['his:famousPrescribe:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:famousPrescribe:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:famousPrescribe:export']"
+        >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+              <el-button
+                type="info"
+                plain
+                icon="el-icon-upload2"
+                size="mini"
+                @click="handleImport"
+
+              >导入</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table height="660" v-loading="loading" :data="famousPrescribeList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+
+      <el-table-column label="图片" align="center" prop="imgUrl" width="120px">
+        <template slot-scope="scope">
+               <el-popover
+                 placement="right"
+                 title=""
+                 trigger="hover">
+                 <img slot="reference" :src="scope.row.imgUrl" width="100px">
+                 <img :src="scope.row.imgUrl" style="max-width: 150px;">
+               </el-popover>
+             </template>
+      </el-table-column>
+      <el-table-column label="经典名方名称" align="center" prop="prescribeName" />
+      <el-table-column label="排序" align="center" prop="sort" />
+      <el-table-column label="方剂类型" align="center" prop="prescribeType">
+        <template slot-scope="scope">
+          <dict-tag :options="prescribeTypeOptions" :value="scope.row.prescribeType"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="主治疾病" align="center" prop="indication" show-overflow-tooltip/>
+      <el-table-column label="归属书籍" align="center" prop="belongBook" show-overflow-tooltip/>
+      <el-table-column label="创建时间" align="center" prop="createTime" width="180"/>
+      <el-table-column label="状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150px">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:famousPrescribe:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+              type="text"
+              @click="handledetails(scope.row)"
+            >详情
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:famousPrescribe:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改经典名方对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
+        <el-form-item label="图片" prop="imgUrl">
+          <el-upload
+                      v-model="form.imgUrl"
+                      class="avatar-uploader"
+                      :action="uploadUrl"
+                      :show-file-list="false"
+                      :on-success="handleAvatarSuccess"
+                      :before-upload="beforeAvatarUpload">
+                      <img v-if="form.imgUrl" :src="form.imgUrl" class="avatar" width="200px">
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="名称" prop="prescribeName">
+          <el-input v-model="form.prescribeName" placeholder="请输入经典名方名称" />
+        </el-form-item>
+        <el-form-item label="拼音" prop="pinyin">
+          <el-input v-model="form.pinyin" placeholder="请输入拼音" />
+        </el-form-item>
+        
+        <el-form-item label="功效概述" prop="pinyin">
+          <el-input v-model="form.actionTitle" placeholder="请输入功效概述" />
+        </el-form-item>
+        <el-form-item label="排序" prop="sort">
+          <el-input-number v-model="form.sort"  :min="0" label="请输入排序"></el-input-number>
+        </el-form-item>
+        <el-form-item label="方剂类型" prop="prescribeType">
+          <el-select v-model="form.prescribeType" placeholder="请选择方剂类型">
+            <el-option
+              v-for="dict in prescribeTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="主治疾病" prop="indication">
+          <el-select v-model="form.indication" placeholder="请选择疾病">
+                <el-option
+                    v-for="dict in indicationOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                  />
+                </el-select>
+        </el-form-item>
+        <el-form-item label="归属书籍" prop="belongBook">
+          <el-select v-model="form.belongBook" placeholder="请选择归属书籍">
+                <el-option
+                    v-for="dict in bookOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                  />
+                </el-select>
+        </el-form-item>
+
+        <el-form-item label="药物作用" prop="action">
+           <editor v-model="form.action" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="用药方法" prop="usageMethod">
+           <editor v-model="form.usageMethod" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="注意事项" prop="msg">
+          <editor v-model="form.msg" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="基本信息">
+          <editor v-model="form.descs" :min-height="192"/>
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-radio-group v-model="form.status">
+            <el-radio
+              v-for="dict in statusOptions"
+              :key="dict.dictValue"
+              :label="parseInt(dict.dictValue)"
+            >{{dict.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-drawer
+    	:with-header="false"
+            size="75%"
+             :title="show.title" :visible.sync="show.open">
+         <famousPrescribeDetails  ref="Details" />
+       </el-drawer>
+       <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+             <el-upload
+               ref="upload"
+               :limit="1"
+               accept=".xlsx, .xls"
+               :headers="upload.headers"
+               :action="upload.url + '?updateSupport=' + upload.updateSupport"
+               :disabled="upload.isUploading"
+               :on-progress="handleFileUploadProgress"
+               :on-success="handleFileSuccess"
+               :auto-upload="false"
+               drag
+             >
+               <i class="el-icon-upload"></i>
+               <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+               <div class="el-upload__tip text-center" slot="tip">
+                 <div class="el-upload__tip" slot="tip">
+              <!--     <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据 -->
+                 </div>
+                 <span>仅允许导入xls、xlsx格式文件。</span>
+                 <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+               </div>
+             </el-upload>
+             <div slot="footer" class="dialog-footer">
+               <el-button type="primary" @click="submitFileForm">确 定</el-button>
+               <el-button @click="upload.open = false">取 消</el-button>
+             </div>
+           </el-dialog>
+  </div>
+
+</template>
+
+<script>
+import { listFamousPrescribe, getFamousPrescribe, delFamousPrescribe,importTemplate, addFamousPrescribe, updateFamousPrescribe, exportFamousPrescribe } from "@/api/store/famousPrescribe";
+import famousPrescribeDetails from '../components/famousPrescribeDetails.vue';
+import { getToken } from "@/utils/auth";
+export default {
+  name: "FamousPrescribe",
+  components: { famousPrescribeDetails},
+  data() {
+    return {
+      show:{
+              open:false,
+            },
+      upload: {
+              // 是否显示弹出层
+              open: false,
+              // 弹出层标题
+              title: "",
+              // 是否禁用上传
+              isUploading: false,
+              // 是否更新已经存在的用户数据
+              updateSupport: 0,
+              // 设置上传的请求头部
+              headers: { Authorization: "Bearer " + getToken() },
+              // 上传的地址
+              url: process.env.VUE_APP_BASE_API + "/his/famousPrescribe/importData"
+            },
+      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
+      baseUrl: process.env.VUE_APP_BASE_API,
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 经典名方表格数据
+      famousPrescribeList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 方剂类型字典
+      prescribeTypeOptions: [],
+      // 状态字典
+      statusOptions: [],
+      bookOptions:[],
+
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        prescribeName: null,
+        imgUrl: null,
+        sort: null,
+        prescribeType: null,
+        indication: null,
+        belongBook: null,
+        descs: null,
+        action: null,
+        usageMethod: null,
+        msg: null,
+        createTime: null,
+        status: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        prescribeName: [
+          { required: true, message: "经典名方名称不能为空", trigger: "blur" }
+        ],
+      },
+      indicationOptions:null,
+      sys_indication:null,
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("sys_famous_prescribe_type").then(response => {
+      this.prescribeTypeOptions = response.data;
+    });
+    this.getDicts("sys_company_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("sys_famous_prescribe_book").then(response => {
+      this.bookOptions = response.data;
+    });
+    this.getDicts("sys_indication").then(response => {
+      this.indicationOptions = response.data;
+    });
+  },
+  methods: {
+    handledetails(row){
+            this.show.open=true;
+            setTimeout(() => {
+                 this.$refs.Details.getDetails(row.id);
+            }, 1);
+        },
+    handleAvatarSuccess(res, file) {
+        if(res.code==200){
+          this.form.imgUrl=res.url;
+          this.$forceUpdate()
+        }
+        else{
+          this.msgError(res.msg);
+        }
+    },
+    updateText(text){
+          this.form.descs=text
+        },
+    beforeAvatarUpload(file) {
+      const isLt1M = file.size / 1024 / 1024 < 1;
+      if (!isLt1M) {
+        this.$message.error('上传图片大小不能超过 1MB!');
+      }
+      return   isLt1M;
+    },
+    /** 查询经典名方列表 */
+    getList() {
+      this.loading = true;
+      listFamousPrescribe(this.queryParams).then(response => {
+        this.famousPrescribeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        prescribeName: null,
+        imgUrl: null,
+        sort: null,
+        prescribeType: null,
+        indication: null,
+        belongBook: null,
+        descs: null,
+        action: null,
+        usageMethod: null,
+        msg: null,
+        createTime: null,
+        status: 0
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 导入按钮操作 */
+        handleImport() {
+          this.upload.title = "导入";
+          this.upload.open = true;
+        },
+        /** 下载模板操作 */
+        importTemplate() {
+          importTemplate().then(response => {
+            this.download(response.msg);
+          });
+        },
+        // 文件上传中处理
+        handleFileUploadProgress(event, file, fileList) {
+          this.upload.isUploading = true;
+        },
+        // 文件上传成功处理
+        handleFileSuccess(response, file, fileList) {
+          this.upload.open = false;
+          this.upload.isUploading = false;
+          this.$refs.upload.clearFiles();
+          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+          this.getList();
+        },
+        // 提交上传文件
+        submitFileForm() {
+          this.$refs.upload.submit();
+        },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加经典名方";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getFamousPrescribe(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        if(this.form.prescribeType!=null){
+          this.form.prescribeType=String(this.form.prescribeType)
+        }
+
+        this.title = "修改经典名方";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateFamousPrescribe(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addFamousPrescribe(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除经典名方编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delFamousPrescribe(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有经典名方数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportFamousPrescribe(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>
+<style>
+    .avatar-uploader .el-upload {
+       border: 1px dashed #d9d9d9;
+       border-radius: 6px;
+       cursor: pointer;
+       position: relative;
+       overflow: hidden;
+     }
+     .avatar-uploader .el-upload:hover {
+       border-color: #409EFF;
+     }
+
+     .avatar-uploader-icon {
+       font-size: 28px;
+       color: #8c939d;
+       width: 150px;
+       height: 150px;
+       line-height: 150px;
+       text-align: center;
+     }
+
+</style>

+ 339 - 0
src/views/store/illnessLibrary/index.vue

@@ -0,0 +1,339 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="疾病名称" prop="illnessName">
+        <el-input
+          v-model="queryParams.illnessName"
+          placeholder="请输入疾病名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="方剂名称" prop="formulaName">
+        <el-input
+          v-model="queryParams.formulaName"
+          placeholder="请输入方剂名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:illnessLibrary:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['his:illnessLibrary:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:illnessLibrary:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:illnessLibrary:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" border :data="illnessLibraryList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="疾病名称" align="center" prop="illnessName" />
+     <el-table-column label="症状" align="center" prop="symptom" show-overflow-tooltip/>
+      <el-table-column label="舌脉" align="center" prop="tongueVein" />
+      <el-table-column label="治法" align="center" prop="therapy" />
+      <el-table-column label="方剂名称" align="center" prop="formulaName" />
+     <el-table-column label="方剂详情" align="center" prop="formulaDescs" show-overflow-tooltip />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:illnessLibrary:edit']"
+          >修改</el-button>
+          <el-button
+              size="mini"
+              type="text"
+              @click="handledetails(scope.row)"
+           >详情
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:illnessLibrary:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改中医疾病对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="疾病名称" prop="illnessName">
+          <el-input v-model="form.illnessName" placeholder="请输入疾病名称" />
+        </el-form-item>
+        <el-form-item label="症状" prop="symptom" >
+          <el-input v-model="form.symptom" placeholder="请输入症状" type="textarea" :rows="4"/>
+        </el-form-item>
+        <el-form-item label="舌脉" prop="tongueVein">
+          <el-input v-model="form.tongueVein" placeholder="请输入舌脉" />
+        </el-form-item>
+        <el-form-item label="治法" prop="therapy">
+          <el-input v-model="form.therapy" placeholder="请输入治法" />
+        </el-form-item>
+        <el-form-item label="方剂名称" prop="formulaName">
+          <el-input v-model="form.formulaName" placeholder="请输入方剂名称" />
+        </el-form-item>
+        <el-form-item label="方剂详情" prop="formulaDescs">
+          <el-input v-model="form.formulaDescs" type="textarea" placeholder="请输入内容" :rows="4"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-drawer
+    	:with-header="false"
+            size="75%"
+             :title="show.title" :visible.sync="show.open">
+         <IllnessLibraryDetails  ref="Details" />
+       </el-drawer>
+
+
+
+  </div>
+</template>
+
+<script>
+import { listillnessLibrary, getillnessLibrary, delillnessLibrary, addillnessLibrary, updateillnessLibrary, exportillnessLibrary } from "@/api/store/illnessLibrary";
+import IllnessLibraryDetails from '../components/IllnessLibraryDetails.vue';
+export default {
+  name: "illnessLibrary",
+  components: { IllnessLibraryDetails },
+  data() {
+    return {
+      show:{
+              open:false,
+            },
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 中医疾病表格数据
+      illnessLibraryList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        illnessName: null,
+        formulaName: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        illnessName: [
+          { required: true, message: "疾病名称不能为空", trigger: "blur" }
+        ],
+        symptom: [
+          { required: true, message: "症状不能为空", trigger: "blur" }
+        ],
+        tongueVein: [
+          { required: true, message: "舌脉不能为空", trigger: "blur" }
+        ],
+        therapy: [
+          { required: true, message: "治法不能为空", trigger: "blur" }
+        ],
+        formulaName: [
+          { required: true, message: "方剂名称不能为空", trigger: "blur" }
+        ],
+        formulaDescs: [
+          { required: true, message: "方剂详情不能为空", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询中医疾病列表 */
+    getList() {
+      this.loading = true;
+      listillnessLibrary(this.queryParams).then(response => {
+        this.illnessLibraryList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        illnessId: null,
+        illnessName: null,
+        symptom: null,
+        tongueVein: null,
+        therapy: null,
+        formulaName: null,
+        formulaDescs: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.illnessId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加中医疾病";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const illnessId = row.illnessId || this.ids
+      getillnessLibrary(illnessId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改中医疾病";
+      });
+    },
+    handledetails(row){
+            this.show.open=true;
+            setTimeout(() => {
+                 this.$refs.Details.getDetails(row.illnessId);
+            }, 1);
+        },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.illnessId != null) {
+            updateillnessLibrary(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addillnessLibrary(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const illnessIds = row.illnessId || this.ids;
+      this.$confirm('是否确认删除中医疾病编号为"' + illnessIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delillnessLibrary(illnessIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有中医疾病数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportillnessLibrary(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 587 - 0
src/views/store/medicatedFood/index.vue

@@ -0,0 +1,587 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="药膳名称" prop="foodName">
+        <el-input
+          v-model="queryParams.foodName"
+          placeholder="请输入药膳名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="创建时间" prop="createTime">
+        <el-date-picker clearable size="small"
+          v-model="queryParams.createTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择创建时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:medicatedFood:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['his:medicatedFood:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:medicatedFood:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:medicatedFood:export']"
+        >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+              <el-button
+                type="info"
+                plain
+                icon="el-icon-upload2"
+                size="mini"
+                @click="handleImport"
+
+              >导入</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table height="660" v-loading="loading" :data="medicatedFoodList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+
+
+      <el-table-column label="图片" align="center" prop="imgUrl" >
+        <template slot-scope="scope">
+               <el-popover
+                 placement="right"
+                 title=""
+                 trigger="hover">
+                 <img slot="reference" :src="scope.row.imgUrl" width="100px">
+                 <img :src="scope.row.imgUrl" style="max-width: 150px;">
+               </el-popover>
+         </template>
+      </el-table-column>
+      <el-table-column label="药膳名称" align="center" prop="foodName" />
+      <el-table-column label="排序" align="center" prop="sort" />
+      <el-table-column label="功效" align="center" prop="action" show-overflow-tooltip/>
+      <el-table-column label="食材" align="center" prop="food" show-overflow-tooltip/>
+      <el-table-column label="主治疾病" align="center" prop="indications" show-overflow-tooltip/>
+      <el-table-column label="创建时间" align="center" prop="createTime" width="180"/>
+      <el-table-column label="状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150px">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:medicatedFood:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+              type="text"
+              @click="handledetails(scope.row)"
+            >详情
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:medicatedFood:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改药膳食疗对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="图片" prop="imgUrl">
+          <el-upload
+                      v-model="form.imgUrl"
+                      class="avatar-uploader"
+                      :action="uploadUrl"
+                      :show-file-list="false"
+                      :on-success="handleAvatarSuccess"
+                      :before-upload="beforeAvatarUpload">
+                      <img v-if="form.imgUrl" :src="form.imgUrl" class="avatar" width="200px">
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="药膳名称" prop="foodName">
+          <el-input v-model="form.foodName" placeholder="请输入药膳名称" />
+        </el-form-item>
+        <el-form-item label="拼音" prop="pinyin">
+          <el-input v-model="form.pinyin" placeholder="请输入拼音" />
+        </el-form-item>
+
+        <el-form-item label="功效概述" prop="pinyin">
+          <el-input v-model="form.actionTitle" placeholder="请输入功效概述" />
+        </el-form-item>
+        <el-form-item label="排序" prop="sort">
+          <el-input-number v-model="form.sort"  :min="0" label="请输入排序"></el-input-number>
+        </el-form-item>
+        <el-form-item label="功效" prop="action">
+          
+          <el-select v-model="form.action" placeholder="请选择功效">
+                <el-option
+                    v-for="dict in actionOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                  />
+                </el-select>
+        
+        </el-form-item>
+        <el-form-item label="食材" prop="food">
+          <el-select v-model="form.food" placeholder="请选择食材">
+                <el-option
+                    v-for="dict in foodOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                  />
+                </el-select>
+    
+        </el-form-item>
+        <el-form-item label="疾病" prop="indications">
+   
+            <el-select v-model="form.indications" placeholder="请选择疾病">
+                  <el-option
+                      v-for="dict in foodOptions"
+                      :key="dict.dictValue"
+                      :label="dict.dictLabel"
+                      :value="dict.dictValue"
+                    />
+                  </el-select>
+        </el-form-item>
+        <el-form-item label="描述">
+          <Editor ref="myeditor"   @on-text-change="updateText"/>
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-radio-group v-model="form.status">
+            <el-radio
+              v-for="dict in statusOptions"
+              :key="dict.dictValue"
+              :label="parseInt(dict.dictValue)"
+            >{{dict.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-drawer
+    	:with-header="false"
+            size="75%"
+             :title="show.title" :visible.sync="show.open">
+         <medicatedFoodDetails  ref="Details" />
+       </el-drawer>
+       <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+             <el-upload
+               ref="upload"
+               :limit="1"
+               accept=".xlsx, .xls"
+               :headers="upload.headers"
+               :action="upload.url + '?updateSupport=' + upload.updateSupport"
+               :disabled="upload.isUploading"
+               :on-progress="handleFileUploadProgress"
+               :on-success="handleFileSuccess"
+               :auto-upload="false"
+               drag
+             >
+               <i class="el-icon-upload"></i>
+               <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+               <div class="el-upload__tip text-center" slot="tip">
+                 <div class="el-upload__tip" slot="tip">
+              <!--     <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据 -->
+                 </div>
+                 <span>仅允许导入xls、xlsx格式文件。</span>
+                 <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+               </div>
+             </el-upload>
+             <div slot="footer" class="dialog-footer">
+               <el-button type="primary" @click="submitFileForm">确 定</el-button>
+               <el-button @click="upload.open = false">取 消</el-button>
+             </div>
+           </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { listMedicatedFood, getMedicatedFood, delMedicatedFood, addMedicatedFood,importTemplate, updateMedicatedFood, exportMedicatedFood } from "@/api/store/medicatedFood";
+import medicatedFoodDetails from '../components/medicatedFoodDetails.vue';
+import Editor from '@/components/Editor/wang';
+import { getToken } from "@/utils/auth";
+export default {
+  name: "MedicatedFood",
+  components: { Editor ,medicatedFoodDetails},
+  data() {
+    return {
+      show:{
+              open:false,
+            },
+      upload: {
+              // 是否显示弹出层
+              open: false,
+              // 弹出层标题
+              title: "",
+              // 是否禁用上传
+              isUploading: false,
+              // 是否更新已经存在的用户数据
+              updateSupport: 0,
+              // 设置上传的请求头部
+              headers: { Authorization: "Bearer " + getToken() },
+              // 上传的地址
+              url: process.env.VUE_APP_BASE_API + "/his/medicatedFood/importData"
+            },
+      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
+      baseUrl: process.env.VUE_APP_BASE_API,
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 药膳食疗表格数据
+      medicatedFoodList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 状态字典
+      statusOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        foodName: null,
+        imgUrl: null,
+        sort: null,
+        action: null,
+        food: null,
+        indications: null,
+        descs: null,
+        createTime: null,
+        status: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+              foodName: [
+                { required: true, message: '请输入药膳名称', trigger: 'blur' },
+              ],
+              pinyin: [
+                { required: true, message: '请输入拼音', trigger: 'blur' },
+              ],
+              imgUrl: [
+                { required: true, message: '请上传图片', trigger: 'change' },
+              ],
+              sort: [
+                { required: true, type: 'number', message: '请输入排序', trigger: 'blur' },
+              ],
+              action: [
+                { required: true, message: '请输入功效', trigger: 'blur' },
+              ],
+              food: [
+                { required: true, message: '请输入食材', trigger: 'blur' },
+              ],
+              indications: [
+                { required: true, message: '请输入疾病', trigger: 'blur' },
+              ],
+              status: [
+                { required: true, message: '请选择状态', trigger: 'change' },
+              ],
+            },
+            foodOptions:null,
+            actionOptions:null,
+            indicationOptions:null,
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("sys_company_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("sys_medicated_food").then(response => {
+      this.foodOptions = response.data;
+    });
+    this.getDicts("sys_medicated_food_action").then(response => {
+      this.actionOptions = response.data;
+    });
+    this.getDicts("sys_indication").then(response => {
+      this.indicationOptions = response.data;
+    });
+  },
+  methods: {
+    handledetails(row){
+            this.show.open=true;
+            setTimeout(() => {
+                 this.$refs.Details.getDetails(row.id);
+            }, 1);
+        },
+    handleAvatarSuccess(res, file) {
+        if(res.code==200){
+          this.form.imgUrl=res.url;
+          this.$forceUpdate()
+        }
+        else{
+          this.msgError(res.msg);
+        }
+    },
+    updateText(text){
+          this.form.descs=text
+        },
+    beforeAvatarUpload(file) {
+      const isLt1M = file.size / 1024 / 1024 < 1;
+      if (!isLt1M) {
+        this.$message.error('上传图片大小不能超过 1MB!');
+      }
+      return   isLt1M;
+    },
+    /** 查询药膳食疗列表 */
+    getList() {
+      this.loading = true;
+      listMedicatedFood(this.queryParams).then(response => {
+        this.medicatedFoodList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        foodName: null,
+        imgUrl: null,
+        sort: null,
+        action: null,
+        food: null,
+        indications: null,
+        descs: null,
+        createTime: null,
+        status: 0
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      setTimeout(() => {
+                this.$refs.myeditor.setText("");
+              }, 500);
+      this.title = "添加药膳食疗";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getMedicatedFood(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        setTimeout(() => {
+                  if(this.form.descs==null){
+                    this.$refs.myeditor.setText("");
+                  }
+                  else{
+                    this.$refs.myeditor.setText(this.form.descs);
+                  }
+                }, 1);
+        this.title = "修改药膳食疗";
+      });
+    },
+
+        /** 导入按钮操作 */
+           handleImport() {
+             this.upload.title = "导入";
+             this.upload.open = true;
+           },
+           /** 下载模板操作 */
+           importTemplate() {
+             importTemplate().then(response => {
+               this.download(response.msg);
+             });
+           },
+           // 文件上传中处理
+           handleFileUploadProgress(event, file, fileList) {
+             this.upload.isUploading = true;
+           },
+           // 文件上传成功处理
+           handleFileSuccess(response, file, fileList) {
+             this.upload.open = false;
+             this.upload.isUploading = false;
+             this.$refs.upload.clearFiles();
+             this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+             this.getList();
+           },
+           // 提交上传文件
+           submitFileForm() {
+             this.$refs.upload.submit();
+           },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateMedicatedFood(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addMedicatedFood(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除药膳食疗编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delMedicatedFood(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有药膳食疗数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportMedicatedFood(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>
+<style>
+    .avatar-uploader .el-upload {
+       border: 1px dashed #d9d9d9;
+       border-radius: 6px;
+       cursor: pointer;
+       position: relative;
+       overflow: hidden;
+     }
+     .avatar-uploader .el-upload:hover {
+       border-color: #409EFF;
+     }
+
+     .avatar-uploader-icon {
+       font-size: 28px;
+       color: #8c939d;
+       width: 150px;
+       height: 150px;
+       line-height: 150px;
+       text-align: center;
+     }
+
+</style>

+ 441 - 0
src/views/store/questions/index.vue

@@ -0,0 +1,441 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="题目" prop="title">
+        <el-input
+          v-model="queryParams.title"
+          placeholder="请输入题目"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="创建时间" prop="createTime">
+        <el-date-picker clearable size="small"
+          v-model="queryParams.createTime"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择创建时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:questions:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['his:questions:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:questions:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:questions:export']"
+        >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+              <el-button
+                type="info"
+                plain
+                icon="el-icon-upload2"
+                size="mini"
+                @click="handleImport"
+
+              >导入</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="questionsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="题目" align="center" prop="title" show-overflow-tooltip/>
+      <el-table-column label="排序" align="center" prop="sort" />
+      <el-table-column label="答案" align="center" prop="answers" show-overflow-tooltip/>
+      <el-table-column label="词条" align="center" prop="tags" show-overflow-tooltip/>
+      <el-table-column label="创建时间" align="center" prop="createTime" width="180"/>
+      <el-table-column label="状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:questions:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:questions:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改问答专区对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="题目" prop="title">
+          <el-input v-model="form.title" placeholder="请输入题目" />
+        </el-form-item>
+        <el-form-item label="词条" prop="tags">
+          <el-input v-model="form.tags" placeholder="请输入词条" type="textarea" rows="4"/>
+        </el-form-item>
+        <el-form-item label="类别" prop="questionsType">
+          <el-select v-model="form.questionsType" placeholder="请选择类别">
+                <el-option
+                    v-for="dict in questionsTypeOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value=" parseInt(dict.dictValue)"
+                  />
+                </el-select>
+        </el-form-item>
+        <el-form-item label="科室" prop="deptId">
+          <el-select v-model="form.deptId" placeholder="请选择科室">
+                <el-option
+                    v-for="dict in depList"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value=" parseInt(dict.dictValue)"
+                  />
+                </el-select>
+        </el-form-item>
+
+        <el-form-item label="答案" prop="answers">
+          <el-input v-model="form.answers" type="textarea" placeholder="请输入内容" rows="4"/>
+        </el-form-item>
+        <el-form-item label="排序" prop="sort">
+          <el-input-number v-model="form.sort"  :min="0" label="请输入排序"></el-input-number>
+        </el-form-item>
+        <el-form-item label="浏览量" prop="views">
+          <el-input-number v-model="form.views"  :min="0" label="浏览量"></el-input-number>
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-radio-group v-model="form.status">
+            <el-radio
+              v-for="dict in statusOptions"
+              :key="dict.dictValue"
+              :label="parseInt(dict.dictValue)"
+            >{{dict.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+          <el-upload
+            ref="upload"
+            :limit="1"
+            accept=".xlsx, .xls"
+            :headers="upload.headers"
+            :action="upload.url + '?updateSupport=' + upload.updateSupport"
+            :disabled="upload.isUploading"
+            :on-progress="handleFileUploadProgress"
+            :on-success="handleFileSuccess"
+            :auto-upload="false"
+            drag
+          >
+            <i class="el-icon-upload"></i>
+            <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+            <div class="el-upload__tip text-center" slot="tip">
+              <div class="el-upload__tip" slot="tip">
+           <!--     <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据 -->
+              </div>
+              <span>仅允许导入xls、xlsx格式文件。</span>
+              <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+            </div>
+          </el-upload>
+          <div slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="submitFileForm">确 定</el-button>
+            <el-button @click="upload.open = false">取 消</el-button>
+          </div>
+        </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listQuestions, getQuestions, delQuestions, addQuestions, updateQuestions, exportQuestions,importTemplate } from "@/api/store/questions";
+import { getToken } from "@/utils/auth";
+import { listDepartment} from "@/api/store/disease";
+export default {
+  name: "Questions",
+  data() {
+    return {
+      upload: {
+              // 是否显示弹出层
+              open: false,
+              // 弹出层标题
+              title: "",
+              // 是否禁用上传
+              isUploading: false,
+              // 是否更新已经存在的用户数据
+              updateSupport: 0,
+              // 设置上传的请求头部
+              headers: { Authorization: "Bearer " + getToken() },
+              // 上传的地址
+              url: process.env.VUE_APP_BASE_API + "/his/questions/importData"
+            },
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      depList: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 问答专区表格数据
+      questionsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 状态字典
+      statusOptions: [],
+      questionsTypeOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        title: null,
+        sort: null,
+        answers: null,
+        tags: null,
+        createTime: null,
+        status: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        title: [
+          { required: true, message: "题目不能为空", trigger: "blur" }
+        ],
+        createTime: [
+          { required: true, message: "创建时间不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("sys_company_status").then(response => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("sys_questions_type").then(response => {
+      this.questionsTypeOptions = response.data;
+    });
+    listDepartment().then(response => {
+      this.depList = response.rows;
+    });
+  },
+  methods: {
+
+    /** 导入按钮操作 */
+        handleImport() {
+          this.upload.title = "导入";
+          this.upload.open = true;
+        },
+        /** 下载模板操作 */
+        importTemplate() {
+          importTemplate().then(response => {
+            this.download(response.msg);
+          });
+        },
+        // 文件上传中处理
+        handleFileUploadProgress(event, file, fileList) {
+          this.upload.isUploading = true;
+        },
+        // 文件上传成功处理
+        handleFileSuccess(response, file, fileList) {
+          this.upload.open = false;
+          this.upload.isUploading = false;
+          this.$refs.upload.clearFiles();
+          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+          this.getList();
+        },
+        // 提交上传文件
+        submitFileForm() {
+          this.$refs.upload.submit();
+        },
+    /** 查询问答专区列表 */
+    getList() {
+      this.loading = true;
+      listQuestions(this.queryParams).then(response => {
+        this.questionsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        title: null,
+        sort: null,
+        answers: null,
+        tags: null,
+        createTime: null,
+        status: 0,
+        views:null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加问答专区";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getQuestions(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改问答专区";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateQuestions(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addQuestions(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除问答专区编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delQuestions(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有问答专区数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportQuestions(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 298 - 0
src/views/store/testReport/index.vue

@@ -0,0 +1,298 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+
+      <el-form-item label="报告编号" prop="reportSn">
+        <el-input
+          v-model="queryParams.reportSn"
+          placeholder="请输入报告编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="模板名称" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入模板名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+       <el-form-item label="创建时间" prop="createTime">
+                 <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
+       </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:testReport:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" border :data="testReportList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+ <!--     <el-table-column label="ID" align="center" prop="reportId" />
+      <el-table-column label="会员ID" align="center" prop="userId" />
+      <el-table-column label="患者ID" align="center" prop="patientId" />
+      <el-table-column label="患者JSON" align="center" prop="patientJson" /> -->
+      <el-table-column label="报告编号" align="center" prop="reportSn" />
+      <el-table-column label="会员昵称" align="center" prop="nickName" />
+      <el-table-column label="会员电话" align="center" prop="phone" />
+      <el-table-column label="诊断结果" align="center" prop="testResult" />
+      <el-table-column label="分数" align="center" prop="score" />
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="提交时间" align="center" prop="createTime" width="150px" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+
+          <el-button
+              size="mini"
+              type="text"
+              @click="handledetails(scope.row)"
+          >详情
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <!-- 添加或修改测试报告对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="诊断结果" prop="testResult">
+          <el-input v-model="form.testResult" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="调理方案" prop="conditioningPlanJson">
+          <el-input v-model="form.conditioningPlanJson" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-drawer
+    	:with-header="false"
+            size="75%"
+             :title="show.title" :visible.sync="show.open">
+         <testReportDetails  ref="Details" />
+       </el-drawer>
+  </div>
+</template>
+
+<script>
+import { listTestReport, getTestReport, delTestReport, addTestReport, updateTestReport, exportTestReport } from "@/api/store/testReport";
+import testReportDetails from '../components/testReportDetails.vue';
+export default {
+  name: "TestReport",
+  components: { testReportDetails },
+  data() {
+    return {
+      show:{
+              open:false,
+            },
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      createTime:null,
+      // 测试报告表格数据
+      testReportList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        userId: null,
+        patientId: null,
+        reportSn: null,
+        patientDescs: null,
+        tempId: null,
+        createTime: null,
+        name:null,
+        sTime:null,
+        eTime:null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    change(){
+          if(this.createTime!=null){
+            this.queryParams.sTime=this.createTime[0];
+            this.queryParams.eTime=this.createTime[1];
+          }else{
+            this.queryParams.sTime=null;
+            this.queryParams.eTime=null;
+          }
+        },
+    /** 查询测试报告列表 */
+    getList() {
+      this.loading = true;
+      listTestReport(this.queryParams).then(response => {
+        this.testReportList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        reportId: null,
+        userId: null,
+        patientId: null,
+        patientJson: null,
+        reportSn: null,
+        patientDescs: null,
+        illnessLogs: null,
+        drugLogs: null,
+        testResult: null,
+        formJson: null,
+        conditioningPlanJson: null,
+        tempId: null,
+        score: null,
+        createTime: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.createTime=null;
+      this.queryParams.sTime=null;
+      this.queryParams.eTime=null;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.reportId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加测试报告";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const reportId = row.reportId || this.ids
+      getTestReport(reportId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改测试报告";
+      });
+    },
+    handledetails(row){
+            this.show.open=true;
+            setTimeout(() => {
+                 this.$refs.Details.getDetails(row.reportId);
+            }, 1);
+        },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.reportId != null) {
+            updateTestReport(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addTestReport(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const reportIds = row.reportId || this.ids;
+      this.$confirm('是否确认删除测试报告编号为"' + reportIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delTestReport(reportIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有测试报告数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportTestReport(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 610 - 0
src/views/store/testTemp/index.vue

@@ -0,0 +1,610 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="名称" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:testTemp:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['his:testTemp:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:testTemp:remove']"
+        >删除</el-button>
+      </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="warning"
+            plain
+            icon="el-icon-download"
+            size="mini"
+            :loading="exportLoading"
+            @click="handleExport"
+            v-hasPermi="['his:testTemp:export']"
+          >导出</el-button>
+        </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" border :data="testTempList" @selection-change="handleSelectionChange" >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="名称" align="center" prop="name" />
+      <el-table-column label="模板编号" align="center" prop="tempCode" />
+      <el-table-column label="状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="副标题" align="center" prop="title" />
+      <el-table-column label="图片" align="center" prop="img" width="100px">
+           <template slot-scope="scope">
+                  <el-popover
+                    placement="right"
+                    title=""
+                    trigger="hover">
+                    <img slot="reference" :src="scope.row.img" width="70px">
+                    <img :src="scope.row.img" style="max-width: 150px;">
+                  </el-popover>
+        </template>
+      </el-table-column>
+      <el-table-column label="预计分钟" align="center" prop="time" />
+      <el-table-column label="题目数量" align="center" prop="num" />
+      <el-table-column label="测试人数" align="center" prop="peopleNum" />
+   <!--   <el-table-column label="备注" align="center" prop="remark" /> -->
+       <el-table-column label="创建时间" align="center" prop="createTime" width="160"/>
+        <el-table-column label="更新时间" align="center" prop="updateTime" width="160"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120px" fixed="right">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:testTemp:edit']"
+          >修改</el-button>
+          <el-button
+               size="mini"
+               type="text"
+              @click="updateItem(scope.row)"
+          >选项管理
+          </el-button>
+           <el-button
+                size="mini"
+                type="text"
+                @click="handledetails(scope.row)"
+                v-hasPermi="['his:testTemp:edit']"
+          >详情
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:testTemp:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <!-- 添加或修改测一测模板对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="名称" prop="name">
+          <el-input v-model="form.name" placeholder="请输入名称" />
+        </el-form-item>
+        <el-form-item label="状态" prop="status">
+          <el-radio-group v-model="form.status"  >
+            <el-radio
+              v-for="dict in statusOptions"
+              :key="dict.dictValue"
+              :label="parseInt(dict.dictValue)"
+            >{{dict.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+                <el-form-item label="副标题" prop="title">
+                  <el-input v-model="form.title" placeholder="请输入标题" />
+                </el-form-item>
+
+                <el-form-item label="图片" prop="img">
+                  <el-upload
+                              v-model="form.img"
+                              class="avatar-uploader"
+                              :action="uploadUrl"
+                              :show-file-list="false"
+                              :on-success="handleAvatarSuccess"
+                              :before-upload="beforeAvatarUpload">
+                              <img v-if="form.img" :src="form.img" class="avatar" width="300px">
+                              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                  </el-upload>
+                </el-form-item>
+                <el-form-item label="预计分钟" prop="time">
+                  <el-input-number v-model="form.time" label="测试人数"></el-input-number>
+                </el-form-item>
+                <el-form-item label="题目数量" prop="num">
+                  <el-input-number v-model="form.num" label="题目数量"></el-input-number>
+                </el-form-item>
+                <el-form-item label="测试人数" prop="peopleNum">
+                   <el-input-number v-model="form.peopleNum" label="测试人数"></el-input-number>
+                </el-form-item>
+                <el-form-item label="排序" prop="sort">
+                   <el-input-number v-model="form.sort" label="排序"></el-input-number>
+                </el-form-item>
+                <el-form-item label="测试提醒" prop="msg">
+                  <el-input v-model="form.msg" placeholder="请输入标题" type="textarea"/>
+                </el-form-item>
+                <el-form-item label="描述" prop="descs" >
+                  <Editor  ref="myeditor"   @on-text-change="updateText"/>
+                </el-form-item>
+
+
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+          <el-row>
+             <el-col :span="3"><div style="margin-top: 9px;font-weight: bold;float: right; margin-right: 10px;">项目类型</div></el-col>
+            <el-col :span="21">
+              <el-table :data="itemTypeJson"   >
+              <el-table-column label="类型" prop="itemType" align="center" >
+                <template slot-scope="scope">
+                  <el-input v-model="scope.row.itemType" ></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" width="150px" align="center">
+                <template slot-scope="scope" >
+                    <el-button @click="addRow" size="mini" type="text" >新增</el-button>
+                    <el-button @click="updateRow(scope.row)" size="mini" type="text" >编辑内容</el-button>
+                    <el-button @click="deleteRow(scope.$index)"   size="mini" type="text" v-if="itemTypeJson.length>1">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+            </el-col>
+          </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="项目类型" :visible.sync="TypeOpen" width="700px" append-to-body>
+      <el-form ref="item" :model="item"  label-width="80px">
+        <el-form-item label="项目类型" prop="itemType">
+          <el-input v-model="item.itemType" placeholder="请输入项目类型" />
+        </el-form-item>
+        <el-form-item label="分值区间" prop="itemType">
+         <el-input-number size="small" v-model="item.min" :max="item.max" ></el-input-number> 到 <el-input-number size="small" v-model="item.max" :min="item.min"></el-input-number>
+        </el-form-item>
+
+
+
+          <el-row>
+             <el-col :span="3"><div style="margin-top: 9px;font-weight: bold;float: right; margin-right: 15px;">项目内容</div></el-col>
+            <el-col :span="21">
+            <el-table :data="item.item"    :cell-style="{ textAlign: 'center' }"		 :header-cell-style="{textAlign: 'center'}"   >
+              <el-table-column label="名称" prop="name" >
+                <template slot-scope="scope">
+                  <el-input v-model="scope.row.name" ></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column label="内容" prop="value" width="340px">
+                <template slot-scope="scope">
+                  <el-input v-model="scope.row.value" type="textarea" :rows="5"></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" width="100px">
+                <template slot-scope="scope">
+                   <el-button @click="deleteType(scope.$index)"   size="mini" type="text" v-if="item.item.length>1">删除</el-button>
+                    <el-button @click="addType" size="mini" type="text" >新增</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-col>
+          </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="TypeOpen = false">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="选项管理" :visible.sync="itemOpen" width="700px" append-to-body>
+        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+            <el-row>
+               <el-col :span="3"><div style="margin-top: 9px;font-weight: bold;float: right; margin-right: 10px;">项目类型</div></el-col>
+              <el-col :span="21">
+                <el-table :data="itemTypeJson"   >
+                <el-table-column label="类型" prop="itemType" align="center" />
+                <el-table-column label="操作" width="150px" align="center">
+                  <template slot-scope="scope" >
+                      <el-button @click="updateitemOpen(scope.row)" size="mini" type="text" >编辑选项</el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+              </el-col>
+            </el-row>
+        </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="itemOpen = false">确 定</el-button>
+      </div>
+    </el-dialog>
+      <el-dialog title="选项内容管理" :visible.sync="testItemOpen" width="700px" append-to-body>
+          <testTempItem  ref="testTempItemDetails" />
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="testItemOpen = false">确 定</el-button>
+        </div>
+      </el-dialog>
+       <el-drawer
+    	:with-header="false"
+            size="75%"
+             :title="show.title" :visible.sync="show.open">
+         <testTempDetails  ref="Details" />
+       </el-drawer>
+  </div>
+</template>
+
+<script>
+import { listTestTemp, getTestTemp, delTestTemp, addTestTemp, updateTestTemp, exportTestTemp } from "@/api/store/testTemp";
+import testTempDetails from '../components/testTempDetails.vue';
+import testTempItem from '../testTempItem/index.vue';
+import Editor from '@/components/Editor/wang';
+export default {
+  name: "TestTemp",
+  components: { testTempDetails ,testTempItem,Editor},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      show:{
+              open:false,
+            },
+
+      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
+      baseUrl: process.env.VUE_APP_BASE_API,
+      itemTypeJson: [
+        { itemType: "类别1", item: [{ name: "名称",value:"内容"}]},
+      ],
+      item:[],
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 测一测模板表格数据
+      testTempList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      itemOpen:false,
+      TypeOpen:false,
+      testItemOpen:false,
+      open: false,
+      // 状态字典
+      statusOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        analysis: null,
+        drugPlan: null,
+        foodPlan: null,
+        mentalPlan: null,
+        livingPlan: null,
+        createTime: null,
+        upateTime: null,
+        status: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        name: [
+          { required: true, message: "名称不能为空", trigger: "blur" }
+        ],
+
+        status: [
+          { required: true, message: "状态不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("sys_company_status").then(response => {
+      this.statusOptions = response.data;
+    });
+  },
+  methods: {
+    handleAvatarSuccess(res, file) {
+        if(res.code==200){
+          this.form.img=res.url;
+          this.$forceUpdate()
+        }
+        else{
+          this.msgError(res.msg);
+        }
+    },
+    beforeAvatarUpload(file) {
+      const isLt1M = file.size / 1024 / 1024 < 1;
+      if (!isLt1M) {
+        this.$message.error('上传图片大小不能超过 1MB!');
+      }
+      return   isLt1M;
+    },
+    updateText(text){
+         this.form.descs=text
+       },
+    updateitemOpen(row){
+      setTimeout(() => {
+           this.$refs.testTempItemDetails.getDetails(row.itemType,this.form.tempId);
+      }, 1);
+      this.testItemOpen=true;
+    },
+    updateItem(row){
+
+      this.reset();
+      getTestTemp(row.tempId).then(response => {
+        this.form = response.data;
+        this.itemTypeJson=  JSON.parse(this.form.itemTypeJson)
+        this.itemOpen=true;
+      });
+    },
+
+
+    addRow() {
+         this.itemTypeJson.push({ itemType: "类别1", item: [{ name: "名称",value:"内容"}]});
+       },
+      deleteRow(index) {
+        this.itemTypeJson.splice(index, 1);
+      },
+      addType() {
+           this.item.item.push({name: "名称",value:"内容"});
+         },
+        deleteType(index) {
+          this.item.item.splice(index, 1);
+        },
+      updateRow(row){
+        this.item=row;
+        this.TypeOpen=true
+      },
+    /** 查询测一测模板列表 */
+    getList() {
+      this.loading = true;
+      listTestTemp(this.queryParams).then(response => {
+        this.testTempList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+        handledetails(row){
+            this.show.open=true;
+            setTimeout(() => {
+                 this.$refs.Details.getDetails(row.tempId);
+            }, 1);
+        },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        tempId: null,
+        name: null,
+        analysis: null,
+        drugPlan: null,
+        foodPlan: null,
+        mentalPlan: null,
+        livingPlan: null,
+        createTime: null,
+        upateTime: null,
+        exercisePlan:null,
+        status: 0,
+        remark: null,
+        itemTypeJson:null,
+        tempCode:null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.tempId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      setTimeout(() => {
+                this.$refs.myeditor.setText("");
+              }, 500);
+      this.itemTypeJson= [
+        { itemType: "类别1", item: [{ name: "名称",value:"内容"}]},
+      ];
+      this.open = true;
+      this.title = "添加测一测模板";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const tempId = row.tempId || this.ids
+      getTestTemp(tempId).then(response => {
+        this.form = response.data;
+        this.itemTypeJson=  JSON.parse(this.form.itemTypeJson)
+        this.open = true;
+        this.title = "修改测一测模板";
+        setTimeout(() => {
+                  if(this.form.descs==null){
+                    this.$refs.myeditor.setText("");
+                  }
+                  else{
+                    this.$refs.myeditor.setText(this.form.descs);
+                  }
+                }, 1);
+      });
+    },
+    hasDuplicateItemType(arr) {
+      const itemTypes = new Set();
+      for (const obj of arr) {
+        if (itemTypes.has(obj.itemType)) {
+          return true;
+        }
+        itemTypes.add(obj.itemType);
+      }
+      return false;
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+            for (var i = 0; i < this.itemTypeJson.length; i++) {
+              if (!this.itemTypeJson[i].itemType) {
+                this.$message("类型不能为空")
+                return;
+              }
+            }
+            if(this.hasDuplicateItemType(this.itemTypeJson)){
+              this.$message("类型名称重复");
+              return;
+            }
+            this.form.itemTypeJson=JSON.stringify(this.itemTypeJson )
+          if (this.form.tempId != null) {
+            updateTestTemp(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addTestTemp(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const tempIds = row.tempId || this.ids;
+      this.$confirm('是否确认删除测一测模板编号为"' + tempIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delTestTemp(tempIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有测一测模板数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportTestTemp(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>
+<style>
+  .el-table .el-table__header th {
+    height: 10px; /* 设置你想要的高度 */
+  }
+  .avatar-uploader .el-upload {
+       border: 1px dashed #d9d9d9;
+       border-radius: 6px;
+       cursor: pointer;
+       position: relative;
+       overflow: hidden;
+     }
+     .avatar-uploader .el-upload:hover {
+       border-color: #409EFF;
+     }
+
+     .avatar-uploader-icon {
+       font-size: 28px;
+       color: #8c939d;
+       width: 150px;
+       height: 150px;
+       line-height: 150px;
+       text-align: center;
+     }
+</style>

+ 324 - 0
src/views/store/testTempItem/index.vue

@@ -0,0 +1,324 @@
+<template>
+  <div class="aaa">
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+        >删除</el-button>
+      </el-col>
+    </el-row>
+    <el-table v-loading="loading" border :data="testTempItemList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+       <el-table-column label="标题" align="center" prop="title" />
+      <el-table-column label="模板名称" align="center" prop="name" />
+      <el-table-column label="项目类型" align="center" prop="itemType" />
+      <el-table-column label="排序号" align="center" prop="sort" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <!-- 添加或修改模板项目对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="标题" prop="title">
+          <el-input v-model="form.title" placeholder="请输入标题" />
+        </el-form-item>
+        <el-row>
+           <el-col :span="3"><div style="margin-top: 9px;font-weight: bold;float: right; margin-right: 15px;">项目内容</div></el-col>
+          <el-col :span="21">
+          <el-table :data="scoreJson"    :cell-style="{ textAlign: 'center' }"		 :header-cell-style="{textAlign: 'center'}"   >
+            <el-table-column label="标题" prop="name" >
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.name" ></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column label="分值" prop="score" >
+              <template slot-scope="scope">
+                 <el-input-number v-model="scope.row.score" controls-position="right"   size="small"></el-input-number>
+               </template>
+            </el-table-column>
+            <el-table-column label="操作">
+              <template slot-scope="scope">
+                 <el-button @click="deleteRow(scope.$index)"   size="mini" type="text" v-if="scoreJson.length>1">删除</el-button>
+                  <el-button @click="addRow" size="mini" type="text" >新增</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-col>
+        </el-row>
+        <el-form-item label="排序" prop="sort">
+            <el-input-number v-model="form.sort"  :min="0" label="排序号"></el-input-number>
+          </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listTestTempItem, getTestTempItem, delTestTempItem, addTestTempItem, updateTestTempItem, exportTestTempItem, } from "@/api/store/testTempItem";
+import { getTempType} from "@/api/store/testTemp";
+
+
+import { getAllTestTemp } from "@/api/store/testTemp";
+import testTempItemDetails from '../components/testTempItemDetails.vue';
+export default {
+  name: "TestTempItem",
+  components: { testTempItemDetails },
+  data() {
+    return {
+      show:{
+              open:false,
+            },
+      scoreJson: [
+        { name: "套餐1", score: "0"},
+      ],
+      itemTypeList:[],
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 模板项目表格数据
+      testTempItemList: [],
+      TempList:[],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 项目类型 数据字典字典
+      itemTypeOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        tempId: null,
+        itemType: null,
+        title: null,
+        sort: null,
+        name: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        title: [
+          { required: true, message: "标题不能为空", trigger: "change" }
+        ],
+        tempId: [
+          { required: true, message: "模板不能为空", trigger: "blur" }
+        ],
+        itemType: [
+          { required: true, message: "项目类型不能为空", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  created() {
+    this.getDicts("sys_test_temp_item_type").then(response => {
+      this.itemTypeOptions = response.data;
+    });
+    this.getTestList();
+
+  },
+  methods: {
+    getDetails(name,id){
+      this.queryParams.itemType=name;
+      this.queryParams.tempId=id;
+      this.getList();
+    },
+    tempIdChange(){
+      getTempType(this.form.tempId).then(response => {
+        this.itemTypeList = response.data;
+        console.log(this.itemTypeList)
+      });
+    },
+    /** 查询模板项目列表 */
+    getList() {
+      this.loading = true;
+      listTestTempItem(this.queryParams).then(response => {
+        this.testTempItemList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    handledetails(row){
+            this.show.open=true;
+            setTimeout(() => {
+                 this.$refs.Details.getDetails(row.itemId,row.name);
+            }, 1);
+        },
+    getTestList(){
+      getAllTestTemp().then(response => {
+        this.TempList = response.rows;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        itemId: null,
+        tempId: null,
+        itemType: null,
+        title: null,
+        scoreJson: null,
+        createTime: null,
+        updateTime: null,
+        sort: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.itemId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    addRow() {
+         this.scoreJson.push({ name: "标题", score: "0"});
+       },
+      deleteRow(index) {
+        this.scoreJson.splice(index, 1);
+      },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加模板项目";
+      this.form.tempId=this.queryParams.tempId;
+      this.form.itemType=this.queryParams.itemType
+      this.scoreJson=[
+        { name: "标题", score: "0"},
+      ];
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const itemId = row.itemId || this.ids
+      getTestTempItem(itemId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改模板项目";
+        this.tempIdChange()
+         this.scoreJson=JSON.parse(this.form.scoreJson)
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          for (var i = 0; i < this.scoreJson.length; i++) {
+            if (!this.scoreJson[i].name) {
+              this.$message("标题不能为空")
+              return;
+            }
+          }
+          this.form.scoreJson=JSON.stringify(this.scoreJson )
+          if (this.form.itemId != null) {
+            updateTestTempItem(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addTestTempItem(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const itemIds = row.itemId || this.ids;
+      this.$confirm('是否确认删除模板项目编号为"' + itemIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delTestTempItem(itemIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有模板项目数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportTestTempItem(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 562 - 0
src/views/store/vessel/index.vue

@@ -0,0 +1,562 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
+      <el-form-item label="经络穴位名称" prop="vesselName">
+        <el-input
+          v-model="queryParams.vesselName"
+          placeholder="经络穴位名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="经络" prop="vessel">
+              <el-select filterable v-model="queryParams.vessel" placeholder="请选择经络" clearable size="small">
+                <el-option
+                  v-for="dict in vesselOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="部位" prop="region">
+              <el-select filterable v-model="queryParams.region" placeholder="请选择部位" clearable size="small">
+                <el-option
+                  v-for="dict in regionOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option
+            v-for="dict in statusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['his:vessel:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['his:vessel:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:vessel:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:vessel:export']"
+        >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+              <el-button
+                type="info"
+                plain
+                icon="el-icon-upload2"
+                size="mini"
+                @click="handleImport"
+
+              >导入</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table height="650" v-loading="loading" :data="vesselList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="图片" align="center" prop="imgUrl" >
+          <template slot-scope="scope">
+                 <el-popover
+                   placement="right"
+                   title=""
+                   trigger="hover">
+                   <img slot="reference" :src="scope.row.imgUrl" width="100px">
+                   <img :src="scope.row.imgUrl" style="max-width: 150px;">
+                 </el-popover>
+           </template>
+      </el-table-column>
+      <el-table-column label="经络穴位名称" align="center" prop="vesselName" />
+
+      <el-table-column label="排序" align="center" prop="sort" />
+      <el-table-column label="经络" align="center" prop="vessel" />
+      <el-table-column label="部位" align="center" prop="region" />
+
+
+      <el-table-column label="状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+       <el-table-column label="创建时间" align="center" prop="createTime" width="180"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150px">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['his:vessel:edit']"
+          >修改</el-button>
+          <el-button
+             size="mini"
+             type="text"
+             @click="handledetails(scope.row)"
+             >详情
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['his:vessel:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改经络管理对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+
+        <el-form-item label="图片" prop="imgUrl">
+          <el-upload
+                      v-model="form.imgUrl"
+                      class="avatar-uploader"
+                      :action="uploadUrl"
+                      :show-file-list="false"
+                      :on-success="handleAvatarSuccess"
+                      :before-upload="beforeAvatarUpload">
+                      <img v-if="form.imgUrl" :src="form.imgUrl" class="avatar" width="200px">
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+          </el-upload>
+        </el-form-item>
+       <el-form-item label="经络穴位名称" prop="vesselName">
+                 <el-input v-model="form.vesselName" placeholder="请输入经络穴位名称" />
+       </el-form-item>
+       <el-form-item label="拼音" prop="pinyin">
+                 <el-input v-model="form.pinyin" placeholder="请输入拼音" />
+       </el-form-item>
+       <el-form-item label="功效概述" prop="pinyin">
+         <el-input v-model="form.actionTitle" placeholder="请输入功效概述" />
+       </el-form-item>
+       <el-form-item label="所属经络" prop="vessel">
+             <el-select v-model="form.vessel" placeholder="请选择经络">
+               <el-option
+                 v-for="dict in vesselOptions"
+                 :key="dict.dictValue"
+                 :label="dict.dictLabel"
+                 :value="dict.dictValue"
+               ></el-option>
+             </el-select>
+       </el-form-item>
+                <el-form-item label="部位" prop="region">
+                  <el-select v-model="form.region" placeholder="请选择部位">
+                    <el-option
+                      v-for="dict in regionOptions"
+                      :key="dict.dictValue"
+                      :label="dict.dictLabel"
+                      :value="dict.dictValue"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+        <el-form-item label="排序" prop="sort">
+          <el-input-number v-model="form.sort"  :min="0" label="请输入排序"></el-input-number>
+        </el-form-item>
+
+       <el-form-item label="描述">
+         <Editor ref="myeditor"   @on-text-change="updateText"/>
+       </el-form-item>
+        <el-form-item label="状态">
+          <el-radio-group v-model="form.status">
+            <el-radio
+              v-for="dict in statusOptions"
+              :key="dict.dictValue"
+              :label="parseInt(dict.dictValue)"
+            >{{dict.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-drawer
+    	:with-header="false"
+            size="75%"
+             :title="show.title" :visible.sync="show.open">
+         <vesselDetails  ref="Details" />
+       </el-drawer>
+       <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+             <el-upload
+               ref="upload"
+               :limit="1"
+               accept=".xlsx, .xls"
+               :headers="upload.headers"
+               :action="upload.url + '?updateSupport=' + upload.updateSupport"
+               :disabled="upload.isUploading"
+               :on-progress="handleFileUploadProgress"
+               :on-success="handleFileSuccess"
+               :auto-upload="false"
+               drag
+             >
+               <i class="el-icon-upload"></i>
+               <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+               <div class="el-upload__tip text-center" slot="tip">
+                 <div class="el-upload__tip" slot="tip">
+              <!--     <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据 -->
+                 </div>
+                 <span>仅允许导入xls、xlsx格式文件。</span>
+                 <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+               </div>
+             </el-upload>
+             <div slot="footer" class="dialog-footer">
+               <el-button type="primary" @click="submitFileForm">确 定</el-button>
+               <el-button @click="upload.open = false">取 消</el-button>
+             </div>
+           </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { listVessel, getVessel, delVessel, addVessel, updateVessel, exportVessel } from "@/api/store/vessel";
+import vesselDetails from '../components/vesselDetails.vue';
+import Editor from '@/components/Editor/wang';
+import { getToken } from "@/utils/auth";
+export default {
+  name: "Vessel",
+  components: { Editor ,vesselDetails},
+  data() {
+    return {
+      upload: {
+              // 是否显示弹出层
+              open: false,
+              // 弹出层标题
+              title: "",
+              // 是否禁用上传
+              isUploading: false,
+              // 是否更新已经存在的用户数据
+              updateSupport: 0,
+              // 设置上传的请求头部
+              headers: { Authorization: "Bearer " + getToken() },
+              // 上传的地址
+              url: process.env.VUE_APP_BASE_API + "/his/vessel/importData"
+            },
+      show:{
+              open:false,
+            },
+      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
+      baseUrl: process.env.VUE_APP_BASE_API,
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 经络管理表格数据
+      vesselList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+        // 经络字典
+            vesselOptions: [],
+            // 部位字典
+            regionOptions: [],
+            // 状态字典
+            statusOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        vesselName: null,
+        imgUrl: null,
+        sort: null,
+        vessel: null,
+        region: null,
+        descs: null,
+        createTime: null,
+        status: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        vesselName: [
+          { required: true, message: "筋络穴位名称不能为空", trigger: "blur" }
+        ],
+        descs: [
+          { required: true, message: "描述不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+       this.getDicts("sys_vessel").then(response => {
+          this.vesselOptions = response.data;
+        });
+        this.getDicts("sys_vessel_region").then(response => {
+          this.regionOptions = response.data;
+        });
+        this.getDicts("sys_company_status").then(response => {
+          this.statusOptions = response.data;
+        });
+  },
+  methods: {
+/** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    handledetails(row){
+            this.show.open=true;
+            setTimeout(() => {
+                 this.$refs.Details.getDetails(row.id);
+            }, 1);
+        },
+    handleAvatarSuccess(res, file) {
+        if(res.code==200){
+          this.form.imgUrl=res.url;
+          this.$forceUpdate()
+        }
+        else{
+          this.msgError(res.msg);
+        }
+    },
+    updateText(text){
+          this.form.descs=text
+        },
+    beforeAvatarUpload(file) {
+      const isLt1M = file.size / 1024 / 1024 < 1;
+      if (!isLt1M) {
+        this.$message.error('上传图片大小不能超过 1MB!');
+      }
+      return   isLt1M;
+    },
+    /** 查询经络管理列表 */
+    getList() {
+      this.loading = true;
+      listVessel(this.queryParams).then(response => {
+        this.vesselList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        vesselName: null,
+        imgUrl: null,
+        sort: null,
+        vessel: null,
+        region: null,
+        descs: null,
+        createTime: null,
+        status: 0
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      setTimeout(() => {
+                this.$refs.myeditor.setText("");
+              }, 500);
+      this.title = "添加经络管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getVessel(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        setTimeout(() => {
+                  if(this.form.descs==null){
+                    this.$refs.myeditor.setText("");
+                  }
+                  else{
+                    this.$refs.myeditor.setText(this.form.descs);
+                  }
+                }, 1);
+        this.title = "修改经络管理";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateVessel(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addVessel(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除经络管理编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delVessel(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有经络管理数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportVessel(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>
+<style>
+    .avatar-uploader .el-upload {
+       border: 1px dashed #d9d9d9;
+       border-radius: 6px;
+       cursor: pointer;
+       position: relative;
+       overflow: hidden;
+     }
+     .avatar-uploader .el-upload:hover {
+       border-color: #409EFF;
+     }
+
+     .avatar-uploader-icon {
+       font-size: 28px;
+       color: #8c939d;
+       width: 150px;
+       height: 150px;
+       line-height: 150px;
+       text-align: center;
+     }
+
+</style>