12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244 |
- <template>
- <div id="classHoursReview">
- <div style="margin-bottom: 10px">
- <el-button
- :size="size"
- :type="active === 1 ? 'primary' : ''"
- @click="changeActive(1)"
- >班级学员</el-button
- >
- <el-button
- :size="size"
- :type="active === 2 ? 'primary' : ''"
- @click="changeActive(2)"
- >学时管理</el-button
- >
- </div>
- <div class="dis_fs">
- <ul class="ul_ls">
- <li>学员编码:{{ userData.studentCode }}</li>
- <li>学员姓名:{{ realName }}</li>
- <li>学员身份证号码:{{ idCard }}</li>
- <li>绑定手机号码:{{ telPhone }}</li>
- </ul>
- <div class="photoSty1">
- <el-image
- style="width: 100%; height: 100%"
- :src="$methodsTools.splitImgHost(recent_photos)"
- :preview-src-list="[$methodsTools.splitImgHost(recent_photos)]"
- >
- </el-image>
- <div class="pos_bottom">一寸头像图</div>
- </div>
- <div class="photoSty2">
- <el-image
- style="width: 100%; height: 100%"
- :src="$methodsTools.splitImgHost(idcard_face_photo)"
- :preview-src-list="[$methodsTools.splitImgHost(idcard_face_photo)]"
- >
- </el-image>
- <div class="pos_bottom">身份证正面照片</div>
- </div>
- <div class="photoSty2" style="margin-right: 0px">
- <el-image
- style="width: 100%; height: 100%"
- :src="$methodsTools.splitImgHost(idcard_national_photo)"
- :preview-src-list="[
- $methodsTools.splitImgHost(idcard_national_photo),
- ]"
- >
- </el-image>
- <div class="pos_bottom">身份证背面照片</div>
- </div>
- </div>
- <div class="dis_fls">
- <div class="s_sd">
- <div class="dis_colu">
- <div class="jdNumSty" style="margin-bottom: 4px">
- 视频学习进度:{{ userData.stuAllNum }}/{{ userData.secAllNum }}
- {{
- userData.stuAllNum == 0 && userData.secAllNum == 0
- ? "0"
- : (userData.stuAllNum / userData.secAllNum) * 100
- }}% 通过:{{ userData.pass }}节
- <span style="color: #f56c6c">作弊:{{ userData.cheat }}节</span>
- <span style="color: #409eff"> 待审:{{ userData.pending }}节</span>
- </div>
- <div class="jdNumSty">
- 做题学习进度:{{ userData.recordNum }}/{{ userData.examNum }}
- {{
- userData.recordNum == 0 && userData.examNum == 0
- ? "0"
- : (userData.recordNum / userData.examNum) * 100
- }}% 通过:{{ userData.examPass }}节
- <span style="color: #f56c6c">作弊:{{ userData.examCheat }}节</span>
- <span style="color: #409eff">
- 待审:{{ userData.examPending }}节</span
- >
- </div>
- </div>
- <div class="shbtns">
- 学时审批状态:{{
- userData.allStatus === 1
- ? "未通过"
- : userData.allStatus === 0
- ? "待审核"
- : userData.allStatus === -1
- ? "不可审核"
- : userData.allStatus === 2
- ? "通过审核"
- : "未知状态,请联系管理员"
- }}
- </div>
- </div>
- <div class="s_sd">
- <div
- class="btnStys"
- @click="getChangeStatus(1)"
- v-if="userData.allStatus === 0 || userData.allStatus === 1"
- >
- 待审核全部通过
- </div>
- <div
- class="btnStys"
- @click="getChangeStatus(2)"
- v-if="userData.allStatus === 0 || userData.allStatus === 1"
- >
- 待审核全部作弊
- </div>
- </div>
- </div>
- <template v-for="(asrt, insrt) in 3">
- <el-table
- border
- v-loading="loading"
- :key="insrt"
- :data="
- listData[
- insrt === 0
- ? 'tableData1'
- : insrt === 1
- ? 'tableData2'
- : insrt === 2
- ? 'tableData3'
- : ''
- ]
- "
- style="width: 100%"
- :default-expand-all="false"
- :header-cell-style="
- insrt === 0
- ? {
- 'background-color': 'skyblue',
- padding: '8px',
- color: '#333',
- }
- : insrt === 1
- ? {
- 'background-color': 'rgb(255,255,204)',
- padding: '8px',
- color: '#333',
- }
- : insrt === 2
- ? {
- 'background-color': '#eee',
- padding: '8px',
- color: '#333',
- }
- : ''
- "
- >
- <!-- 插槽开始--------------------------------------------------------- -->
- <el-table-column
- :label="
- insrt === 0 ? '模块' : insrt === 1 ? '章' : insrt === 2 ? '节' : ''
- "
- type="expand"
- width="70px"
- >
- <template slot-scope="scope">
- <!-- type为3时使用该插槽START -->
- <div
- v-if="scope.row.type === 3 || scope.row.type === 4"
- class="dis_flexs"
- >
- <ul
- style="flex: 1"
- v-if="
- scope.row.userStudyRecordPhotoList &&
- scope.row.userStudyRecordPhotoList.length
- "
- >
- <li
- v-for="(its, inds) in scope.row.userStudyRecordPhotoList"
- :key="inds"
- class="liImgs"
- >
- <el-image
- style="width: 100%; height: 100%"
- :src="$methodsTools.splitImgHost(its.photo)"
- :preview-src-list="[$methodsTools.splitImgHost(its.photo)]"
- >
- </el-image>
- <div class="abos">
- {{ $methodsTools.onlyForma(its.createTime) }}
- </div>
- </li>
- <div style="clear: both"></div>
- </ul>
- <p v-else style="text-align: center; width: 100%">暂无拍照数据</p>
- <div
- class="styFlex"
- v-if="
- (userData.allStatus === 0 || userData.allStatus === 1) &&
- scope.row.periodStatus === 1
- "
- >
- <el-button
- :disabled="scope.row.status === 1"
- class="btnstyles"
- size="mini"
- @click="changeStatus(scope.row, 1, scope.$index)"
- >通过</el-button
- >
- <el-button
- :disabled="scope.row.status === 0"
- class="btnstyles"
- size="mini"
- @click="
- scope.row.status === 2 || scope.row.status === 3
- ? changeStatus(scope.row, 2, scope.$index)
- : ''
- "
- >作弊</el-button
- >
- </div>
- <!-- <div
- class="styFlex"
- v-if="
- (scope.row.allStatus === 0 || scope.row.allStatus === 1) &&
- scope.row.periodStatus === 1 &&
- scope.row.status === 0
- "
- >
- <el-button
- class="btnstyles"
- size="mini"
- @click="changeStatus(scope.row, 1, scope.$index)"
- >通过</el-button
- >
- </div> -->
- </div>
- <!-- type为3时使用该插槽END -->
- <!-- 章表格START -->
- <el-table
- v-else
- border
- :data="
- scope.row.type === 1
- ? scope.row.classPeriods
- : scope.row.type === 2
- ? scope.row.classPeriodSectionList
- : ''
- "
- style="width: 100%"
- :default-expand-all="false"
- :header-cell-style="
- scope.row.type === 1
- ? {
- 'background-color': 'rgb(255,255,204)',
- padding: '8px',
- color: '#333',
- }
- : scope.row.type === 2
- ? {
- 'background-color': '#eee',
- padding: '8px',
- color: '#333',
- }
- : ''
- "
- >
- <!-- 章插槽START -->
- <el-table-column
- type="expand"
- :label="
- scope.row.type === 1
- ? '章'
- : scope.row.type === 2
- ? '节/卷'
- : ''
- "
- :width="
- scope.row.type === 1
- ? '70px'
- : scope.row.type === 2
- ? '80px'
- : ''
- "
- >
- <template slot-scope="scope2">
- <!-- 节插槽START -->
- <div
- v-if="scope2.row.type === 3 || scope2.row.type === 4"
- class="dis_flexs"
- >
- <ul
- style="flex: 1"
- v-if="
- scope2.row.userStudyRecordPhotoList &&
- scope2.row.userStudyRecordPhotoList.length
- "
- >
- <li
- v-for="(its, inds) in scope2.row
- .userStudyRecordPhotoList"
- :key="inds"
- class="liImgs"
- >
- <el-image
- style="width: 100%; height: 100%"
- :src="$methodsTools.splitImgHost(its.photo)"
- :preview-src-list="[
- $methodsTools.splitImgHost(its.photo),
- ]"
- >
- </el-image>
- <div class="abos">
- {{ $methodsTools.onlyForma(its.createTime) }}
- </div>
- </li>
- <div style="clear: both"></div>
- </ul>
- <p v-else style="text-align: center; width: 100%">
- 暂无拍照数据
- </p>
- <div
- class="styFlex"
- v-if="
- (userData.allStatus === 0 ||
- userData.allStatus === 1) &&
- scope2.row.periodStatus === 1
- "
- >
- <el-button
- :disabled="scope2.row.status === 1"
- class="btnstyles"
- size="mini"
- @click="
- changeStatusCharpter(
- scope2.row,
- 1,
- scope.$index,
- scope2.$index
- )
- "
- >通过</el-button
- >
- <el-button
- :disabled="scope2.row.status === 0"
- class="btnstyles"
- size="mini"
- @click="
- scope2.row.status === 2 || scope2.row.status === 3
- ? changeStatusCharpter(
- scope2.row,
- 2,
- scope.$index,
- scope2.$index
- )
- : ''
- "
- >作弊</el-button
- >
- </div>
- <!-- <div
- class="styFlex"
- v-if="
- (scope2.row.allStatus === 0 ||
- scope2.row.allStatus === 1) &&
- scope2.row.periodStatus === 1 &&
- scope2.row.status === 0
- "
- >
- <el-button
- class="btnstyles"
- size="mini"
- @click="
- changeStatusCharpter(
- scope2.row,
- 1,
- scope.$index,
- scope2.$index
- )
- "
- >通过</el-button
- >
- </div> -->
- </div>
- <!-- 节插槽END -->
- <!-- 节表格START -->
- <el-table
- v-else
- border
- :data="
- scope2.row.type === 2
- ? scope2.row.classPeriodSectionList
- : ''
- "
- style="width: 100%"
- :default-expand-all="false"
- :header-cell-style="
- scope2.row.type === 2
- ? {
- 'background-color': '#eee',
- padding: '8px',
- color: '#333',
- }
- : ''
- "
- >
- <!-- 节插槽START -->
- <el-table-column
- type="expand"
- :label="scope2.row.type === 2 ? '节/卷' : ''"
- width="80px"
- >
- <template slot-scope="scope3">
- <div
- v-if="scope3.row.type === 3 || scope3.row.type === 4"
- class="dis_flexs"
- >
- <ul
- style="flex: 1"
- v-if="
- scope3.row.userStudyRecordPhotoList &&
- scope3.row.userStudyRecordPhotoList.length
- "
- >
- <li
- v-for="(its, inds) in scope3.row
- .userStudyRecordPhotoList"
- :key="inds"
- class="liImgs"
- >
- <el-image
- style="width: 100%; height: 100%"
- :src="$methodsTools.splitImgHost(its.photo)"
- :preview-src-list="[
- $methodsTools.splitImgHost(its.photo),
- ]"
- >
- </el-image>
- <div class="abos">
- {{ $methodsTools.onlyForma(its.createTime) }}
- </div>
- </li>
- <div style="clear: both"></div>
- </ul>
- <p v-else style="text-align: center; width: 100%">
- 暂无拍照数据
- </p>
- <div
- class="styFlex"
- v-if="
- (userData.allStatus === 0 ||
- userData.allStatus === 1) &&
- scope3.row.periodStatus === 1
- "
- >
- <el-button
- :disabled="scope3.row.status === 1"
- class="btnstyles"
- size="mini"
- @click="
- changeStatusModule(
- scope3.row,
- 1,
- scope.$index,
- scope2.$index,
- scope3.$index
- )
- "
- >通过</el-button
- >
- <el-button
- :disabled="scope3.row.status === 0"
- class="btnstyles"
- size="mini"
- @click="
- scope3.row.status === 2 ||
- scope3.row.status === 3
- ? changeStatusModule(
- scope3.row,
- 2,
- scope.$index,
- scope2.$index,
- scope3.$index
- )
- : ''
- "
- >作弊</el-button
- >
- </div>
- <!-- <div
- class="styFlex"
- v-if="
- (scope3.row.allStatus === 0 ||
- scope3.row.allStatus === 1) &&
- scope3.row.periodStatus === 1 &&
- scope3.row.status === 0
- "
- >
- <el-button
- class="btnstyles"
- size="mini"
- @click="
- changeStatusModule(
- scope3.row,
- 1,
- scope.$index,
- scope2.$index,
- scope3.$index
- )
- "
- >通过</el-button
- >
- </div> -->
- </div>
- </template>
- </el-table-column>
- <!-- 节插槽END -->
- <template
- v-for="(item, index) in scope2.row.type === 2
- ? tableSet3
- : ''"
- >
- <el-table-column
- :width="item.width"
- :key="index"
- :label="item.label"
- align="center"
- >
- <template slot-scope="scope3">
- <span v-if="item.scope === 'select'">
- <span v-for="(k, ds) in item.options" :key="ds">
- {{
- k.value == scope3.row[item.prop] ? k.label : ""
- }}
- </span>
- </span>
- <div v-else-if="item.scope === 'activeNum'">
- <el-select
- v-model="scope3.row[item.prop]"
- placeholder="请选择"
- @change="
- getNewListMores(
- scope.$index,
- scope2.$index,
- scope3.$index,
- $event,
- scope3.row
- )
- "
- >
- <el-option
- v-for="(items, indexs) in scope3.row['numList']"
- :key="indexs"
- :label="'第' + items + '次审核记录'"
- :value="items"
- >
- </el-option>
- </el-select>
- </div>
- <span v-else-if="item.scope === 'typeOptions'">
- <span v-for="(is, ds) in item.options" :key="ds">
- <span v-if="is.value === scope3.row[item.prop]">{{
- is.label
- }}</span>
- </span>
- </span>
- <span v-else-if="item.scope === 'aTime'">
- {{ $methodsTools.onlyForma(scope3.row[item.prop]) }}
- </span>
- <span v-else> {{ scope3.row[item.prop] }} </span>
- </template>
- </el-table-column>
- </template>
- </el-table>
- <!-- 节表格END -->
- </template>
- </el-table-column>
- <!-- 章插槽END -->
- <template
- v-for="(item, index) in scope.row.type === 1
- ? tableSet2
- : scope.row.type === 2
- ? tableSet3
- : ''"
- >
- <el-table-column
- :width="item.width"
- :key="index"
- :label="item.label"
- align="center"
- >
- <template slot-scope="scope2">
- <span v-if="item.scope === 'select'">
- <span v-for="(k, ds) in item.options" :key="ds">
- {{ k.value == scope2.row[item.prop] ? k.label : "" }}
- </span>
- </span>
- <div v-else-if="item.scope === 'activeNum'">
- <el-select
- v-model="scope2.row[item.prop]"
- placeholder="请选择"
- @change="
- getNewListchapt(
- scope.$index,
- scope2.$index,
- $event,
- scope2.row
- )
- "
- >
- <el-option
- v-for="(items, indexs) in scope2.row['numList']"
- :key="indexs"
- :label="'第' + items + '次审核记录'"
- :value="items"
- >
- </el-option>
- </el-select>
- </div>
- <span v-else-if="item.scope === 'typeOptions'">
- <span v-for="(is, ds) in item.options" :key="ds">
- <span v-if="is.value === scope2.row[item.prop]">{{
- is.label
- }}</span>
- </span>
- </span>
- <span v-else-if="item.scope === 'aTime'">
- {{ $methodsTools.onlyForma(scope2.row[item.prop]) }}
- </span>
- <span v-else> {{ scope2.row[item.prop] }} </span>
- </template>
- </el-table-column>
- </template>
- </el-table>
- <!-- 章表格END -->
- </template>
- </el-table-column>
- <!-- 插槽结束--------------------------------------------------------- -->
- <template
- v-for="(item, index) in insrt === 0
- ? tableSet1
- : insrt === 1
- ? tableSet2
- : insrt === 2
- ? tableSet3
- : ''"
- >
- <el-table-column
- :width="item.width"
- :key="index"
- :label="item.label"
- align="center"
- >
- <template slot-scope="scope">
- <span v-if="item.scope === 'select'">
- <span v-for="(k, ds) in item.options" :key="ds">
- {{ k.value == scope.row[item.prop] ? k.label : "" }}
- </span>
- </span>
- <div v-else-if="item.scope === 'activeNum'">
- <el-select
- v-model="scope.row[item.prop]"
- placeholder="请选择"
- @change="getNewList(scope.$index, $event, scope.row)"
- >
- <el-option
- v-for="(items, indexs) in scope.row['numList']"
- :key="indexs"
- :label="'第' + items + '次审核记录'"
- :value="items"
- >
- </el-option>
- </el-select>
- </div>
- <span v-else-if="item.scope === 'typeOptions'">
- <span v-for="(is, ds) in item.options" :key="ds">
- <span v-if="is.value === scope.row[item.prop]">{{
- is.label
- }}</span>
- </span>
- </span>
- <span v-else-if="item.scope === 'aTime'">
- {{ $methodsTools.onlyForma(scope.row[item.prop]) }}
- </span>
- <span v-else>
- {{ scope.row[item.prop] }}{{ item.ch ? item.ch : "" }}
- </span>
- </template>
- </el-table-column>
- </template>
- </el-table>
- </template>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- size: "medium",
- active: "",
- loading: false,
- studentCode: "",
- realName: "",
- idCard: "",
- telPhone: "",
- recent_photos: "",
- idcard_face_photo: "",
- idcard_national_photo: "",
- arr: ["tableData1", "tableData2", "tableData3"],
- listData: {
- tableData1: [],
- tableData2: [],
- tableData3: [],
- },
- userData: {},
- tableData: [],
- tableSet1: [
- {
- label: "姓名",
- prop: "realName",
- },
- {
- label: "模块标题",
- prop: "typeName",
- },
- {
- label: "学时",
- prop: "classHours",
- },
- ],
- tableSet2: [
- {
- label: "姓名",
- prop: "realName",
- },
- {
- label: "章标题",
- prop: "typeName",
- },
- {
- label: "学时",
- prop: "classHours",
- },
- {
- label: "开始学习时间",
- prop: "studyStartTime",
- scope: "aTime",
- },
- {
- label: "结束学习时间",
- prop: "studyEndTime",
- scope: "aTime",
- },
- {
- label: "测试成绩",
- prop: "performance",
- },
- ],
- tableSet3: [
- {
- label: "选择",
- prop: "numIndex",
- scope: "activeNum",
- width: "180px",
- },
- {
- label: "姓名",
- prop: "realName",
- },
- {
- label: "标题",
- prop: "typeName",
- },
- {
- label: "类型",
- prop: "type",
- scope: "typeOptions",
- options: [
- {
- label: "节",
- value: 3,
- },
- {
- label: "试卷",
- value: 4,
- },
- ],
- },
- {
- label: "开始时间",
- prop: "studyStartTime",
- scope: "aTime",
- },
- {
- label: "结束时间",
- prop: "studyEndTime",
- scope: "aTime",
- },
- {
- label: "审核状态",
- prop: "status",
- scope: "select",
- options: [
- {
- label: "待审核",
- value: 2,
- },
- {
- label: "通过",
- value: 1,
- },
- {
- label: "作弊",
- value: 0,
- },
- ],
- },
- {
- label: "审核时间",
- prop: "auditTime",
- scope: "aTime",
- },
- ],
- tableSet4: [
- {
- label: "选择",
- prop: "numIndex",
- scope: "activeNum",
- width: "180px",
- },
- {
- label: "姓名",
- prop: "realName",
- },
- {
- label: "题卷标题",
- prop: "typeName",
- },
- {
- label: "开始做题时间",
- prop: "studyStartTime",
- scope: "aTime",
- },
- {
- label: "结束做题时间",
- prop: "studyEndTime",
- scope: "aTime",
- },
- {
- label: "审核状态",
- prop: "status",
- scope: "select",
- options: [
- {
- label: "待审核",
- value: 2,
- },
- {
- label: "通过",
- value: 1,
- },
- {
- label: "作弊",
- value: 0,
- },
- ],
- },
- {
- label: "审核时间",
- prop: "auditTime",
- scope: "aTime",
- },
- ],
- tableDataChild: {},
- tableSetChild: [],
- };
- },
- mounted() {
- this.getUserInfo();
- this.search();
- },
- methods: {
- /**
- * 通过 作弊 periodId
- */
- changeStatus(item, int, index) {
- var data = {
- id: item.periodStatusId,
- };
- if (int === 1) {
- data.status = 1;
- }
- if (int === 2) {
- data.status = 0;
- }
- this.$api.editGradeUsereditPeriode(data).then((res) => {
- this.$message.success("修改成功");
- this.getNewList(index, item.numIndex, item);
- });
- },
- changeStatusCharpter(item, int, index1, index2) {
- var data = {
- id: item.periodStatusId,
- };
- if (int === 1) {
- data.status = 1;
- }
- if (int === 2) {
- data.status = 0;
- }
- this.$api.editGradeUsereditPeriode(data).then((res) => {
- this.$message.success("修改成功");
- this.getNewListchapt(index1, index2, item.numIndex, item);
- });
- },
- changeStatusModule(item, int, index1, index2, index3) {
- var data = {
- id: item.periodStatusId,
- };
- if (int === 1) {
- data.status = 1;
- }
- if (int === 2) {
- data.status = 0;
- }
- this.$api.editGradeUsereditPeriode(data).then((res) => {
- this.$message.success("修改成功");
- this.getNewListMores(index1, index2, index3, item.numIndex, item);
- });
- },
- //批量审批
- getChangeStatus(int) {
- var data = {
- gradeId: Number(this.$route.query.id),
- userId: Number(this.$route.query.userId),
- goodsId: Number(this.$route.query.goodsId),
- };
- if (int === 1) {
- data.status = 1;
- }
- if (int === 2) {
- data.status = 0;
- }
- this.$api.editGradeUsereditPeriodeAll(data).then((res) => {
- if (int === 1) {
- this.$message.success("状态全部通过修改成功");
- }
- if (int === 2) {
- this.$message.success("状态全部作弊修改成功");
- }
- this.getUserInfo();
- this.search();
- });
- },
- //节
- getNewList(index, int, item) {
- let data = {
- courseId: item.courseId,
- moduleId: item.moduleId,
- chapterId: item.chapterId,
- numIndex: int,
- userId: this.$route.query.userId,
- goodsId: this.$route.query.goodsId,
- gradeId: this.$route.query.id,
- };
- if (item.type === 3) {
- data.sectionId = item.id;
- }
- if (item.type === 4) {
- data.examId = item.id;
- }
- this.$api.inquireGradegradelistPeriodAuditStatus(data).then((res) => {
- this.$set(this.listData.tableData3, index, res.data);
- this.getUserInfo();
- });
- },
- //章 节
- getNewListchapt(a, b, int, item) {
- let data = {
- courseId: item.courseId,
- moduleId: item.moduleId,
- chapterId: item.chapterId,
- numIndex: int,
- userId: this.$route.query.userId,
- goodsId: this.$route.query.goodsId,
- gradeId: this.$route.query.id,
- };
- if (item.type === 3) {
- data.sectionId = item.id;
- }
- if (item.type === 4) {
- data.examId = item.id;
- }
- this.$api.inquireGradegradelistPeriodAuditStatus(data).then((res) => {
- this.$set(
- this.listData.tableData2[a].classPeriodSectionList,
- b,
- res.data
- );
- this.getUserInfo();
- });
- },
- //模块 章 节
- getNewListMores(a, b, c, int, item) {
- let data = {
- courseId: item.courseId,
- moduleId: item.moduleId,
- chapterId: item.chapterId,
- numIndex: int,
- userId: this.$route.query.userId,
- goodsId: this.$route.query.goodsId,
- gradeId: this.$route.query.id,
- };
- if (item.type === 3) {
- data.sectionId = item.id;
- }
- if (item.type === 4) {
- data.examId = item.id;
- }
- this.$api.inquireGradegradelistPeriodAuditStatus(data).then((res) => {
- this.$set(
- this.listData.tableData1[a].classPeriods[b].classPeriodSectionList,
- c,
- res.data
- );
- this.getUserInfo();
- });
- },
- //获取用户信息
- getUserInfo() {
- this.$api
- .inquireGradegradelistUserlistPeriod({
- gradeId: this.$route.query.id,
- userId: this.$route.query.userId,
- goodsId: this.$route.query.goodsId,
- })
- .then((res) => {
- if (res.rows[0].keyValue) {
- var data = JSON.parse(res.rows[0].keyValue);
- this.recent_photos = data.recent_photos.value;
- this.idcard_face_photo = data.idcard_face_photo.value;
- this.idcard_national_photo = data.idcard_national_photo.value;
- this.realName = data.name.value;
- this.idCard = data.idcard.value;
- this.telPhone = data.telphone.value;
- }
- this.userData = res.rows[0];
- });
- },
- search() {
- let data = {
- gradeId: this.$route.query.id,
- userId: this.$route.query.userId,
- goodsId: this.$route.query.goodsId,
- };
- this.loading = true;
- this.$api
- .inquireGradegradelistPeriodAudit(data)
- .then((res) => {
- let tab1 = [];
- let tab2 = [];
- let tab3 = [];
- for (let i = 0; i < res.rows.length; i++) {
- if (res.rows[i].type === 1) {
- tab1.push(res.rows[i]);
- }
- if (res.rows[i].type === 2) {
- tab2.push(res.rows[i]);
- }
- if (res.rows[i].type === 3) {
- tab3.push(res.rows[i]);
- }
- }
- this.listData.tableData1 = tab1;
- this.listData.tableData2 = tab2;
- this.listData.tableData3 = tab3;
- })
- .finally(() => {
- this.loading = false;
- });
- },
- //切换顶部BTN
- changeActive(int) {
- if (int === 1) {
- this.active = int;
- this.$router.push({
- path: "studentMenu",
- query: {
- id: this.$route.query.id,
- },
- });
- }
- if (int === 2) {
- this.active = int;
- this.$router.push({
- path: "classHours",
- query: {
- id: this.$route.query.id,
- },
- });
- }
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .styFlex {
- width: 80px;
- text-align: center;
- }
- .btnstyles {
- margin-left: 0px;
- margin-bottom: 10px;
- }
- .dis_flexs {
- display: flex;
- align-items: center;
- }
- .dis_fs {
- display: flex;
- align-items: center;
- height: 211px;
- background-color: #eee;
- padding: 0px 30px;
- overflow: auto;
- .ul_ls {
- margin-right: 30px;
- align-self: flex-start;
- li {
- font-size: 14px;
- white-space: nowrap;
- margin-bottom: 14px;
- }
- }
- &::-webkit-scrollbar {
- width: 14px;
- height: 14px;
- }
- &::-webkit-scrollbar-track,
- &::-webkit-scrollbar-thumb {
- border-radius: 999px;
- border: 5px solid transparent;
- }
- &::-webkit-scrollbar-track {
- box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2) inset;
- }
- &::-webkit-scrollbar-thumb {
- min-height: 20px;
- background-clip: content-box;
- box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.2) inset;
- }
- &::-webkit-scrollbar-corner {
- background: transparent;
- }
- }
- .photoSty1 {
- flex-shrink: 0;
- width: 150px;
- height: 160px;
- background-color: #fff;
- margin-right: 60px;
- position: relative;
- }
- .photoSty2 {
- position: relative;
- flex-shrink: 0;
- width: 230px;
- height: 160px;
- margin-right: 60px;
- background-color: #fff;
- }
- .pos_bottom {
- position: absolute;
- height: 20px;
- bottom: 0px;
- left: 0px;
- right: 0px;
- background-color: rgba(0, 0, 0, 0.8);
- text-align: center;
- line-height: 20px;
- font-size: 14px;
- color: #fff;
- }
- .dis_fls {
- margin: 16px 0px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- flex-wrap: wrap;
- .s_sd {
- display: flex;
- align-items: center;
- flex-shrink: 0;
- margin-bottom: 10px;
- .dis_colu {
- height: 55px;
- margin-right: 14px;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- font-size: 14px;
- }
- }
- }
- .jdNumSty {
- border: 1px solid #000;
- border-radius: 6px;
- padding: 6px;
- }
- .shbtns {
- padding: 0px 10px;
- height: 55px;
- line-height: 55px;
- background-color: #eee;
- border-radius: 6px;
- }
- .btnStys {
- border: 1px solid #666;
- padding: 0px 8px;
- border-radius: 4px;
- font-size: 15px;
- margin-right: 8px;
- cursor: pointer;
- }
- .liImgs {
- float: left;
- width: 250px;
- height: 250px;
- margin-right: 20px;
- margin-bottom: 20px;
- position: relative;
- .abos {
- position: absolute;
- bottom: 0px;
- width: 100%;
- height: 44px;
- line-height: 44px;
- font-size: 16px;
- color: #000;
- text-align: center;
- background-color: rgba(90, 90, 90, 0.7);
- }
- }
- </style>
|