华西海圻ELN前端工程
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

198 lines
5.2 KiB

  1. <template>
  2. <div class="study-syxx">
  3. <div class="syxx-top" v-show="!showDetail" style="margin-bottom: 10px;">
  4. <div class="syxx-operate">
  5. <div class="operate-img"></div>
  6. <div class="operate-left">{{ $t('page.business.study.studyFormPlan.syxx') }}</div>
  7. </div>
  8. <el-form ref="form" label-width="90px">
  9. <el-row>
  10. <el-col :span="6">
  11. <el-form-item :label="$t('page.business.study.studyFormPlan.symc')">
  12. {{ studyInfo.name }}
  13. </el-form-item>
  14. </el-col>
  15. <el-col :span="6">
  16. <el-form-item :label="$t('page.business.study.studyFormPlan.sybh')">
  17. {{ studyInfo.sn }}
  18. </el-form-item>
  19. </el-col>
  20. <el-col :span="6">
  21. <el-form-item :label="$t('page.business.study.studyFormPlan.syfzr')">
  22. {{ studyInfo.leaderName }}
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="6">
  26. <el-form-item :label="$t('page.business.study.studyFormPlan.cjsj')">
  27. {{ studyInfo.createTime }}
  28. </el-form-item>
  29. </el-col>
  30. </el-row>
  31. </el-form>
  32. </div>
  33. <div class="syxx-content">
  34. <div class="search-box" v-show="!showDetail">
  35. <div class="search-item" :class="active === item.key ? 'active' : ''" v-for="(item, index) in tabList"
  36. :key="index" @click="changeTab(item)">
  37. {{ item.name }}
  38. </div>
  39. </div>
  40. <div class="content-box" v-if="studyInfo.id&&studyInfo.id!=''">
  41. <sjList v-if="active === 'sjlb'" :study="studyInfo" @showDetail="showDetailCallback" />
  42. <gspList v-if="active === 'gsplb'" :study="studyInfo" @showDetail="showDetailCallback" />
  43. <gyzjList v-if="active === 'gyzjlb'" :study="studyInfo" @showDetail="showDetailCallback" />
  44. <mjyList v-if="active === 'mjylb'" :study="studyInfo" @showDetail="showDetailCallback"/>
  45. <cellList v-if="active === 'xblb'" :study="studyInfo" @showDetail="showDetailCallback"/>
  46. <bacteriaList v-if="active === 'xjlb'" :study="studyInfo" @showDetail="showDetailCallback"/>
  47. </div>
  48. </div>
  49. </div>
  50. </template>
  51. <script>
  52. import { checkPermi, checkRole } from "@/utils/permission";
  53. import { study_info } from "@/api/business/study/study"
  54. import gyzjList from './wzlb/gyzjList.vue'
  55. import sjList from './wzlb/sjList.vue'
  56. import gspList from './wzlb/gspList.vue'
  57. import cellList from './wzlb/cellList.vue'
  58. import bacteriaList from './wzlb/bacteriaList.vue'
  59. export default {
  60. name: 'StudyWzlb',
  61. props: {
  62. study: {
  63. type: Object,
  64. default: () => {
  65. return {}
  66. }
  67. }
  68. },
  69. watch: {
  70. study: {
  71. immediate: true,
  72. handler(v) {
  73. this.studyId = v.id
  74. this.getStudyInfo()
  75. }
  76. },
  77. },
  78. components: {gyzjList, sjList, gspList, cellList, bacteriaList},
  79. data() {
  80. return {
  81. showDetail: false,
  82. studyId: '',
  83. studyInfo: {},
  84. tabList: [
  85. { key: 'sjlb', name: this.$t('page.business.study.studyEnter.sjlb') },
  86. { key: 'gsplb', name: this.$t('page.business.study.studyEnter.gsplb') },
  87. { key: 'gyzjlb', name: this.$t('page.business.study.studyEnter.gyzjlb') },
  88. { key: 'xblb', name: this.$t('page.business.study.studyEnter.xblb') },
  89. { key: 'xjlb', name: this.$t('page.business.study.studyEnter.xjlb') }
  90. ],
  91. active: 'sjlb',
  92. }
  93. },
  94. created() {
  95. },
  96. methods: {
  97. checkPermi,
  98. checkRole,
  99. getStudyInfo() {
  100. this.$modal.loading()
  101. study_info({ id: this.studyId }).then(response => {
  102. this.studyInfo = response.data
  103. this.$modal.closeLoading()
  104. }).finally(() => {
  105. this.$modal.closeLoading()
  106. })
  107. },
  108. showDetailCallback(val) {
  109. this.showDetail = val
  110. this.$emit('showDetail', val)
  111. },
  112. changeTab(item) {
  113. if (this.active !== item.key) {
  114. this.active = item.key
  115. }
  116. }
  117. }
  118. }
  119. </script>
  120. <style lang="scss" scoped>
  121. .study-syxx {
  122. .search-box {
  123. background: #fff;
  124. padding: 0;
  125. border-radius: 3px;
  126. margin-bottom: 10px;
  127. display: flex;
  128. flex-direction: row;
  129. align-items: center;
  130. .search-item {
  131. padding: 10px 20px;
  132. font-size: 14px;
  133. cursor: pointer;
  134. &.active {
  135. background: #1890ff;
  136. color: #fff;
  137. }
  138. &:hover {
  139. background: #46a6ff;
  140. color: #fff;
  141. }
  142. &:first-child {
  143. border-top-left-radius: 3px;
  144. border-bottom-left-radius: 3px;
  145. }
  146. &:last-child {
  147. border-top-right-radius: 3px;
  148. border-bottom-right-radius: 3px;
  149. }
  150. }
  151. }
  152. .syxx-top {
  153. background: #fff;
  154. padding: 20px;
  155. width: 100%;
  156. .syxx-operate {
  157. margin: 0px 0 10px 0;
  158. display: flex;
  159. flex-direction: row;
  160. align-items: center;
  161. color: #409eff;
  162. .operate-img {
  163. flex-shrink: 0;
  164. height: 15px;
  165. background: #409eff;
  166. width: 3px;
  167. }
  168. .operate-left {
  169. flex-shrink: 0;
  170. font-weight: bold;
  171. padding-left: 10px;
  172. }
  173. .operate-right {
  174. flex-grow: 1;
  175. text-align: right;
  176. .operate-icon {
  177. cursor: pointer;
  178. }
  179. }
  180. }
  181. }
  182. .syxx-content {}
  183. }
  184. </style>