| @ -0,0 +1,169 @@ | |||||
| <template> | |||||
| <div class="study-syxx"> | |||||
| <div class="syxx-top" v-show="!showDetail" style="margin-bottom: 10px;"> | |||||
| <div class="syxx-operate"> | |||||
| <div class="operate-img"></div> | |||||
| <div class="operate-left">{{ $t('page.business.study.studyFormPlan.syxx') }}</div> | |||||
| </div> | |||||
| <el-form ref="form" label-width="90px"> | |||||
| <el-row> | |||||
| <el-col :span="6"> | |||||
| <el-form-item :label="$t('page.business.study.studyFormPlan.symc')"> | |||||
| {{ studyInfo.name }} | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| <el-col :span="6"> | |||||
| <el-form-item :label="$t('page.business.study.studyFormPlan.sybh')"> | |||||
| {{ studyInfo.sn }} | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| <el-col :span="6"> | |||||
| <el-form-item :label="$t('page.business.study.studyFormPlan.syfzr')"> | |||||
| {{ studyInfo.leaderName }} | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| <el-col :span="6"> | |||||
| <el-form-item :label="$t('page.business.study.studyFormPlan.cjsj')"> | |||||
| {{ studyInfo.createTime }} | |||||
| </el-form-item> | |||||
| </el-col> | |||||
| </el-row> | |||||
| </el-form> | |||||
| </div> | |||||
| <div class="syxx-content"> | |||||
| </div> | |||||
| <Sign ref="syxxSignRef" @callback="doSign" /> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import { checkPermi, checkRole } from "@/utils/permission"; | |||||
| import { study_info,study_checkSd,study_sd } from "@/api/business/study/study" | |||||
| import { studySubject_listByStudyId } from '@/api/business/study/studySubject' | |||||
| export default { | |||||
| name: 'StudyWzlb', | |||||
| props: { | |||||
| study: { | |||||
| type: Object, | |||||
| default: () => { | |||||
| return {} | |||||
| } | |||||
| } | |||||
| }, | |||||
| watch: { | |||||
| study: { | |||||
| immediate: true, | |||||
| handler(v) { | |||||
| this.id = v.id | |||||
| this.getStudyInfo() | |||||
| } | |||||
| }, | |||||
| }, | |||||
| components: { }, | |||||
| data() { | |||||
| return { | |||||
| userId:this.$store.getters.id, | |||||
| showDetail: false, | |||||
| id: {}, | |||||
| studyInfo:{}, | |||||
| subjectList: [] | |||||
| } | |||||
| }, | |||||
| created() { | |||||
| }, | |||||
| methods: { | |||||
| checkPermi, | |||||
| checkRole, | |||||
| getstudySubject() { | |||||
| studySubject_listByStudyId({ studyId: this.id }).then(response => { | |||||
| this.subjectList = response.data; | |||||
| }).finally(() => { | |||||
| this.$modal.closeLoading() | |||||
| }) | |||||
| }, | |||||
| getStudyInfo() { | |||||
| this.$modal.loading() | |||||
| study_info({ id: this.id }).then(response => { | |||||
| this.studyInfo = response.data | |||||
| this.getstudySubject() | |||||
| }).finally(() => { | |||||
| this.$modal.closeLoading() | |||||
| }) | |||||
| }, | |||||
| sdsy() { | |||||
| this.$modal.loading() | |||||
| study_checkSd({ | |||||
| study:{id:this.study.id}, | |||||
| }).then(() => { | |||||
| this.$refs.syxxSignRef.show(this.$t('page.business.study.study.sdsy'),this.$t('page.business.study.study.sdsy')) | |||||
| }).finally(() => { | |||||
| this.$modal.closeLoading() | |||||
| }) | |||||
| }, | |||||
| doSign(val){ | |||||
| this.doSd(val) | |||||
| }, | |||||
| doSd(sign){ | |||||
| this.$modal.loading() | |||||
| study_sd({ | |||||
| study:{id:this.study.id}, | |||||
| sign:sign | |||||
| }).then(() => { | |||||
| this.$refs.syxxSignRef.cancel() | |||||
| this.getStudyInfo() | |||||
| }).finally(() => { | |||||
| this.$modal.closeLoading() | |||||
| }) | |||||
| }, | |||||
| showDetailCallback(val) { | |||||
| this.showDetail = val | |||||
| this.$emit('showDetail', val) | |||||
| } | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .study-syxx { | |||||
| .syxx-top { | |||||
| background: #fff; | |||||
| padding: 20px; | |||||
| width: 100%; | |||||
| .syxx-operate { | |||||
| margin: 0px 0 10px 0; | |||||
| display: flex; | |||||
| flex-direction: row; | |||||
| align-items: center; | |||||
| color: #409eff; | |||||
| .operate-img { | |||||
| flex-shrink: 0; | |||||
| height: 15px; | |||||
| background: #409eff; | |||||
| width: 3px; | |||||
| } | |||||
| .operate-left { | |||||
| flex-shrink: 0; | |||||
| font-weight: bold; | |||||
| padding-left: 10px; | |||||
| } | |||||
| .operate-right { | |||||
| flex-grow: 1; | |||||
| text-align: right; | |||||
| .operate-icon { | |||||
| cursor: pointer; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| .syxx-content { | |||||
| } | |||||
| } | |||||
| </style> | |||||