| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453 |
- <template>
- <div class="page_report">
- <div class="report_module">
- <div class="introduction">
- <img src="@/assets/studentCase/banner.webp" />
- </div>
- <div class="module_common">
- <div class="module_common_title question_1">1.请填写你对各科的目标分数和目标排名。</div>
- <div class="module_common_content module_table">
- <el-table :data="tableData" border stripe align="center">
- <el-table-column align="center" prop="target" label="目标" width="148" v-if="tableData.length > 0"></el-table-column>
- <!-- 各科列 -->
- <el-table-column align="center" v-for="subject in subjects" :key="subject" :label="subject">
- <template slot-scope="scope">
- <template v-if="!isEdit">
- {{ scope.row[subject] }}
- </template>
- <el-input v-else v-model="scope.row[subject]" style="width: 100%;" @input="ValidateNumber(scope.row,subject)" />
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div class="module_common">
- <div class="module_common_title question_2">2.请选择你认为的第1个薄弱学科,并填写你对该学科的计划和困惑。</div>
- <div class="module_common_content text_padding">
- <div class="common_content_title">薄弱学科1</div>
- <div class="common_content_select">
- <el-select v-model="firstWeakSubject.subjectName" placeholder="请选择科目" @change="ChangeFirstWeakSubject">
- <el-option v-for="(item,index) in subjects" :key="`subject_1_${index}`" :label="item" :value="item"></el-option>
- </el-select>
- </div>
- <div class="common_content_subtitle">计划和困惑</div>
- <div class="common_content_text">
- <el-input v-if="isEdit" type="textarea" placeholder="请输入你对该学科的计划和困惑。" v-model="firstWeakSubject.textValue" :rows="9" maxlength="1000" show-word-limit></el-input>
- <template v-else>
- <!-- <p>一、现状分析</p> -->
- {{ firstWeakSubject.textValue }}
- </template>
- </div>
- </div>
- </div>
- <div class="module_common">
- <div class="module_common_title question_3">3.请选择你认为的第2个薄弱学科,并填写你对该学科的计划和困惑。</div>
- <div class="module_common_content text_padding">
- <div class="common_content_title">薄弱学科2</div>
- <div class="common_content_select">
- <el-select v-model="secondWeakSubject.subjectName" placeholder="请选择科目" @change="ChangeSecondWeakSubject">
- <el-option v-for="(item,index) in subjects" :key="`subject_2_${index}`" :label="item" :value="item"></el-option>
- </el-select>
- </div>
- <div class="common_content_subtitle">计划和困惑</div>
- <div class="common_content_text">
- <el-input v-if="isEdit" type="textarea" placeholder="请输入你对该学科的计划和困惑。" v-model="secondWeakSubject.textValue" :rows="9" maxlength="1000" show-word-limit></el-input>
- <template v-else>
- <!-- <p>一、现状分析</p> -->
- {{ secondWeakSubject.textValue }}
- </template>
- </div>
- </div>
- </div>
- <div class="module_common">
- <div class="module_common_title question_4">4.针对学习上的问题,你最想与哪位老师沟通?并想让老师提供什么帮助?</div>
- <div class="module_common_content text_padding">
- <div class="common_content_text">
- <el-input v-if="isEdit" type="textarea" placeholder="请输入你对该学科的计划和困惑。" v-model="needTeacherValue" :rows="9" maxlength="1000" show-word-limit></el-input>
- <template v-else>
- {{ needTeacherValue }}
- </template>
- </div>
- </div>
- </div>
- </div>
- <GotoTop></GotoTop>
- </div>
- </template>
- <script>
- import GotoTop from '@/views/analysisReport/components/GotoTop' //分析报告页面底部回到顶部组件
- export default {
- name: 'oneStudOneCase',
- components: {
- GotoTop
- },
- data() {
- return {
- subjects:[],//科目
- subjectsCode:[],//科目code
- tableData: [],//表格数据
- id: '',
- examId: '',
- schoolId: '',
- studentName: '',
- studentNo: '',
- studentCode: '',
- firstWeakSubject:{
- subjectCode: 10,
- subjectName: '',
- textValue: ''
- },//第一个薄弱学科
- secondWeakSubject:{
- subjectCode: 10,
- subjectName: '',
- textValue: ''
- },//第二个薄弱学科
- needTeacherValue:'',//
- isEdit:false,//是否可编辑
- }
- },
- computed: {
- reportParam() {
- return {
- examId: this.$store.state.report.filterObject.examId, //考试id
- }
- },
- },
- mounted() {
- this.GetOneStudentOneCase();
- },
- methods: {
- ValidateNumber(row,subject) {
- // 只允许数字输入
- row[subject] = row[subject].replace(/[^0-9.]/g, '');
- },
- // 查询学生一生一案数据
- GetOneStudentOneCase() {
- this.$api.reportStudent.jointSchoolReport.getOneStudentOneCase(this.reportParam).then(res => {
- if (res.code == 200 && res.data) {
- const {id,examId,schoolId,studentName,studentNo,studentCode,subjectVoList,studentGoalVoList,firstWeakSubject,secondWeakSubject,needTeacherValue} = res.data;
- if(studentGoalVoList){
- const studentGoalList = studentGoalVoList || [];
- this.subjects = [];
- this.subjectsCode = [];
- this.tableData = [];
- let obj1 = {target: '目标分数'},obj2 = {target: '目标排名'};
- studentGoalList.forEach(item => {
- this.subjects.push(item.subjectName);
- this.subjectsCode.push(item.subjectCode);
- obj1[item.subjectName] = item?.goalScore || '-';
- obj2[item.subjectName] = item?.goalRank || '-';
- });
- this.tableData.push(obj1,obj2)
- }else{
- const subjectList = subjectVoList || [];
- this.subjects = [];
- this.subjectsCode = [];
- this.tableData = [];
- let obj1 = {target: '目标分数'},obj2 = {target: '目标排名'};
- subjectList.forEach(item => {
- this.subjects.push(item.subjectName);
- this.subjectsCode.push(item.subjectCode);
- obj1[item.subjectName] = '-';
- obj2[item.subjectName] = '-';
- });
- this.tableData.push(obj1,obj2)
- }
- this.id = id;
- this.examId = examId;
- this.schoolId = schoolId;
- this.studentName = studentName;
- this.studentNo = studentNo;
- this.studentCode = studentCode;
- this.firstWeakSubject = {
- subjectCode: firstWeakSubject?.subjectCode || '',
- subjectName: firstWeakSubject?.subjectName || '',
- textValue: firstWeakSubject?.textValue || '暂无'
- };//第一个薄弱学科
- this.secondWeakSubject = {
- subjectCode: secondWeakSubject?.subjectCode || '',
- subjectName: secondWeakSubject?.subjectName || '',
- textValue: secondWeakSubject?.textValue || '暂无'
- };//第二个薄弱学科
- this.needTeacherValue = needTeacherValue || '暂无';
- } else {
- this.subjects = [];//科目
- this.subjectsCode = [];//科目code
- this.tableData = [];//表格数据
- this.id = '';
- this.examId = '';
- this.schoolId = '';
- this.studentName = '';
- this.studentNo = '';
- this.studentCode = '';
- this.firstWeakSubject = {
- subjectCode: '',
- subjectName: '',
- textValue: '暂无'
- };//第一个薄弱学科
- this.secondWeakSubject = {
- subjectCode: '',
- subjectName: '',
- textValue: '暂无'
- };//第二个薄弱学科
- this.needTeacherValue = '暂无';
- }
- })
- },
- //编辑
- EditOneStudOneCase(isEdit){
- this.isEdit = isEdit;
- if(!isEdit){
- const studentGoalVoList = this.subjects.map((item,index)=>{
- return {
- subjectCode: this.subjectsCode[index],
- subjectName: item,
- goalScore: this.tableData[0][item],
- goalRank: this.tableData[1][item]
- }
- });
- this.$api.reportStudent.jointSchoolReport.changeOneStudentOneCase({
- id:this.id,
- examId:this.examId,
- schoolId:this.schoolId,
- studentName:this.studentName,
- studentNo:this.studentNo,
- studentCode:this.studentCode,
- studentGoalVoList:studentGoalVoList,
- firstWeakSubject:this.firstWeakSubject,
- secondWeakSubject:this.secondWeakSubject,
- needTeacherValue:this.needTeacherValue
- }).then(res => {
- if(res.code == 200){
- this.$message.success(res.msg);
- }else{
- this.$message.error(res.msg);
- }
- })
- }
- },
- ChangeFirstWeakSubject(val){
- const index = this.subjects.indexOf(val);
- this.firstWeakSubject.subjectCode = this.subjectsCode?.[index] || '';
- },
- ChangeSecondWeakSubject(val){
- const index = this.subjects.indexOf(val);
- this.secondWeakSubject.subjectCode = this.subjectsCode?.[index] || '';
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .report_module {
- padding: 20px;
- box-sizing: border-box;
- .introduction {
- width: 100%;
- // height: 200px;
- // background: url('@/assets/studentCase/banner.webp') left top no-repeat;
- background-size: cover;
- // background: linear-gradient( 281deg, #007EFF 0%, #1F8FFE 10.96%, #89C8FB 34.86%, #CFE8FE 73.44%, #E5ECFC 100%);
- border-radius: 20px 20px;
- overflow: hidden;
- img {
- width: 100%;
- }
- }
- .module_common {
- margin-top: 40px;
- width: 100%;
- padding-top: 40px;
- position: relative;
- .module_common_title {
- position: absolute;
- z-index: 2;
- left: 0;
- top: 0;
- font-weight: 600;
- font-size: 16px;
- line-height: 40px;
- color: #FFFFFF;
- padding-left: 24px;
- &.question_1 {
- width: 367px;
- height: 50px;
- background: url('@/assets/studentCase/question_1.webp') left top no-repeat;
- background-size: 100% 100%;
- }
- &.question_2 {
- width: 556px;
- height: 50px;
- background: url('@/assets/studentCase/question_2.webp') left top no-repeat;
- background-size: 100% 100%;
- }
- &.question_3 {
- width: 556px;
- height: 50px;
- background: url('@/assets/studentCase/question_3.webp') left top no-repeat;
- background-size: 100% 100%;
- }
- &.question_4 {
- width: 596px;
- height: 50px;
- background: url('@/assets/studentCase/question_4.webp') left top no-repeat;
- background-size: 100% 100%;
- }
- }
- .module_common_content {
- width: 100%;
- background: #F4F9FF;
- border-radius: 0px 10px 10px 10px;
- &.module_table {
- padding: 40px;
- box-sizing: border-box;
- :deep(.el-table) {
- border-radius: 6px;
- border: 1px solid #5AAFFF;
- border-right: 0px solid #5AAFFF;
- border-bottom: 0px solid #5AAFFF;
- .el-table__header th {
- background-color: #EEF7FF;
- color: #303133;
- font-weight: 500;
- font-size: 16px;
- .cell {
- color: #303133;
- font-weight: 500;
- font-size: 16px;
- }
- }
- .el-table__body-wrapper {
- table {
- tr {
- td {
- border-right: 1px solid #5AAFFF;
- border-bottom: 1px solid #5AAFFF;
- &:first-child{
- background-color: #EEF7FF;
- }
- .el-input__inner{
- height: 36px;
- line-height: 36px;
- font-weight: 400;
- font-size: 16px;
- color: #333333;
- text-align: center;
- }
- }
- td:nth-last-child(2) {
- border-right: 1px solid #5AAFFF;
- }
- td:last-child,
- th:last-child {
- border-right: 0px solid #5AAFFF;
- }
- }
- }
- }
- thead {
- color: #333333 !important;
- font-weight: 500;
- font-size: 16px;
- height: 50px;
- }
- .cell {
- font-size: 16px;
- color: #333333;
- line-height: normal !important;
- }
- .el-table__cell {
- padding: 0;
- height: 50px;
- }
- }
- }
- .el-table::before, .el-table--group::after, .el-table--border::after{
- background-color:#5AAFFF;
- }
- :deep(.el-table__fixed)::before, :deep(.el-table__fixed-right)::before{
- background-color:#5AAFFF;
- }
- :deep(.el-table--border) .el-table__cell{
- border-right: 1px solid #5AAFFF;
- }
- :deep(.el-table) th.el-table__cell.is-leaf, :deep(.el-table) td.el-table__cell{
- border-bottom: 1px solid #5AAFFF;
- }
- &.text_padding{
- min-height: 240px;
- padding: 30px 20px 20px;
- box-sizing: border-box;
- .common_content_title{
- display: flex;
- width: 100%;
- font-weight: 600;
- font-size: 16px;
- color: #333333;
- line-height: 22px;
- }
- .common_content_select{
- display: flex;
- width: 100%;
- margin-top: 10px;
- :deep(.el-input__inner){
- height: 36px;
- line-height: 36px;
- padding:0 12px;
- background-color: #F4F9FF;
- border-radius: 4px;
- border: 1px solid #DCDFE6;
- }
- :deep(.el-input__icon){
- line-height: 36px;
- }
- }
- .common_content_subtitle{
- display: flex;
- width: 100%;
- margin: 30px 0 10px;
- font-weight: 600;
- font-size: 16px;
- color: #333333;
- line-height: 22px;
- }
- .common_content_text{
- display: flex;
- width: 100%;
- flex-direction: column;
- :deep(.el-textarea__inner){
- border-radius: 10px;
- border: 1px solid #DCDFE6;
- font-weight: 400;
- font-size: 14px;
- color: #333333;
- line-height: 24px;
- }
- p{
- width: 100%;
- font-weight: 400;
- font-size: 14px;
- color: #333333;
- line-height: 24px;
- }
- }
- }
- }
- }
- }
- </style>
|