华西海圻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.

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