123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610 |
- <template>
- <div class="app-container">
- <el-row :gutter="20">
- <el-col :xs="24">
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-refresh"
- size="mini"
- @click="refreshTable1"
- >刷新</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="success"
- plain
- icon="el-icon-edit"
- size="mini"
- >批量确认已送</el-button>
- </el-col>
- </el-row>
- <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="50" align="center" />
- <el-table-column label="座号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
- <el-table-column label="更换件" align="center" key="className" prop="className" v-if="columns[1].visible" :show-overflow-tooltip="true" />
- <el-table-column label="学员姓名" align="center" key="majorName" prop="majorName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
- <el-table-column label="状态" align="center" key="remark" prop="remark1" v-if="columns[3].visible" :show-overflow-tooltip="true" />
- <el-table-column label="申请时间" align="center" prop="createTime" v-if="columns[4].visible" width="160">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.createTime) }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="操作"
- align="center"
- width="160"
- class-name="small-padding fixed-width"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-position"
- @click="handleUpdate(scope.row)"
- >已送</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-finished"
- @click="handleDelete(scope.row)"
- >驳回</el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- </el-col>
- </el-row>
- <el-row style="margin-top: 2%;">
- <el-col>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- plain
- icon="el-icon-refresh"
- size="mini"
- @click="refreshTable1"
- >刷新</el-button>
- </el-col>
- </el-row>
- <el-table v-loading="loading" :data="tableArr1" >
- <el-table-column label="座号" align="center" key="xuehao" prop="zuohao" v-if="tab_columns[0].visible" />
- <el-table-column label="模拟器状态" align="center" key="className" prop="monitype" v-if="tab_columns[1].visible" :show-overflow-tooltip="true" >
- <template scope="scope">
- <span v-if="scope.row.monitype==='就绪'" style="color: green">就绪</span>
- <span v-else-if="scope.row.monitype==='离线'" style="color: red">离线</span>
- </template>
- </el-table-column>
- <el-table-column label="学员学号" align="center" key="majorName" prop="xuehao" v-if="tab_columns[2].visible" :show-overflow-tooltip="true" />
- <el-table-column label="学员姓名" align="center" key="remark" prop="xingming" v-if="tab_columns[3].visible" :show-overflow-tooltip="true" />
- <el-table-column label="考试状态" align="center" prop="kaoshitype" v-if="tab_columns[4].visible" width="160">
- <template scope="scope">
- <span v-if="scope.row.kaoshitype==='已交卷'" style="color: green">已交卷</span>
- <span v-else-if="scope.row.kaoshitype==='未登录'" style="color: red">未登录</span>
- <span v-else-if="scope.row.kaoshitype==='已登录'" style="color: blue">已登录</span>
- </template>
- </el-table-column>
- <el-table-column label="考试成绩" align="center" prop="chengji" v-if="tab_columns[5].visible" width="160"></el-table-column>
- <el-table-column label="出题题目" align="center" prop="timu" v-if="tab_columns[6].visible" width="160"></el-table-column>
- <el-table-column label="故障现象" align="center" prop="xianxiang" v-if="tab_columns[7].visible" width="160"></el-table-column>
- <el-table-column label="可能原因" align="center" prop="reason" v-if="tab_columns[8].visible" width="160"></el-table-column>
- <el-table-column label="故障部位" align="center" prop="buwen" v-if="tab_columns[9].visible" width="160"></el-table-column>
- <el-table-column label="排除方法" align="center" prop="fangfa" v-if="tab_columns[10].visible" width="160"></el-table-column>
- <el-table-column label="修复结论" align="center" prop="jielun" v-if="tab_columns[11].visible" width="160"></el-table-column>
- </el-table>
- </el-col>
- </el-row>
- <el-row style="margin-top: 1%;">
- <el-form ref="form" :model="form" label-width="80px">
- <el-col v-for="(item, index) in tableArr2" :key="index">
- <div class="box">
- <div class="content1">{{ item.key }}</div>
- <div class="content2">{{ item.value1}}</div>
- <div class="content2">{{ item.value2}}</div>
- <div class="content2">{{ item.value3}}</div>
- <div class="content2">{{ item.value4}}</div>
- <div class="content2">{{ item.value5}}</div>
- <div class="content2">{{ item.value6}}</div>
- <div class="content2">{{ item.value7}}</div>
- <div class="content2">{{ item.value8}}</div>
- <div class="content2">{{ item.value9}}</div>
- <div class="content2">{{ item.value10}}</div>
- </div>
- </el-col>
- <el-col v-for="(item, index) in tableArr3" :key="index">
- <div class="box">
- <div class="content1">{{ item.key1 }}</div>
- <div class="content2">
- <!-- {{ item.value11}} -->
- <template >
- <input class="borderless-input_defen" name="duibie" v-model="item.value11"/>
- </template>
- </div>
- <div class="content2">
- <template >
- <input class="borderless-input_defen" name="duibie" v-model="item.value12"/>
- </template>
- <!-- {{ item.value12}} -->
- </div>
- <div class="content2">
- <template >
- <input class="borderless-input_defen" name="duibie" v-model="item.value13"/>
- </template>
- </div>
- <div class="content2">
- <template >
- <input class="borderless-input_defen" name="duibie" v-model="item.value14"/>
- </template>
- </div>
- <div class="content2">
- <template >
- <input class="borderless-input_defen" name="duibie" v-model="item.value15"/>
- </template>
- </div>
- <div class="content2">
- <template >
- <input class="borderless-input_defen" name="duibie" v-model="item.value16"/>
- </template>
- </div>
- <div class="content2">
- <template >
- <input class="borderless-input_defen" name="duibie" v-model="item.value17"/>
- </template>
- </div>
- <div class="content2">
- <template >
- <input class="borderless-input_defen" name="duibie" v-model="item.value18"/>
- </template>
- </div>
- <div class="content2">
- <template >
- <input class="borderless-input_defen" name="duibie" v-model="item.value19"/>
- </template>
- </div>
- <div class="content2">
- <template >
- <input class="borderless-input_defen" name="duibie" v-model="item.value110"/>
- </template>
- </div>
- </div>
- </el-col>
- </el-form>
- </el-row>
- <div slot="footer" style="margin-top: 2%; text-align: center;">
- <el-button type="primary">确认成绩并结束本批次考试</el-button>
- </div>
- </div>
- </template>
- <style>
- .borderless-input_defen {
- border: none;
- /* 移除边框 */
- outline: none; /* 移除点击输入框时浏览器自带的轮廓线 */
- text-align: center;
- width: 145px;
- }
- .box {
- width: 100%;
- height: 40px;
- display: flex;
- border-left: 1px solid #e9e9e9;
- border-top: 1px solid #e9e9e9;
- }
- .content1 {
- width: 80%;
- height: 40px;
- line-height: 40px;
- text-align: center;
- background-color: #fafafa;
- border-right: 1px solid #e9e9e9;
- border-bottom: 1px solid #e9e9e9;
- color:green;
- font-size: 14px;
- }
- .content2 {
- width: 60%;
- height: 40px;
- line-height: 40px;
- text-align: center;
- background-color: #fff;
- border-right: 1px solid #e9e9e9;
- border-bottom: 1px solid #e9e9e9;
- /* color: #b0b0b2; */
- font-size: 14px;
- }
- </style>
- <script>
- import { listStudent, getStudent, delStudent, addStudent, updateStudent } from "@/api/sim/student";
- import { getToken } from "@/utils/auth";
- export default {
- // name: "User",
- dicts: ['sys_normal_disable', 'sys_user_sex'],
- data() {
- return {
- tableArr1: [{
- zuohao: '01',
- monitype: '就绪',
- xuehao: '2024001',
- xingming: '张三',
- kaoshitype: '未登录',
- chengji: '80',
- },
- {
- zuohao: '02',
- monitype: '离线',
- xuehao: '2024001',
- xingming: '李四',
- kaoshitype: '已登录',
- chengji: '80',
- },{
- zuohao: '03',
- monitype: '就绪',
- xuehao: '2024001',
- xingming: '张',
- kaoshitype: '已交卷',
- chengji: '80',
- },{
- zuohao: '04',
- monitype: '离线',
- xuehao: '2024001',
- xingming: '王',
- kaoshitype: '剩余时间',
- chengji: '80',
- },
- ],
- tableArr2: [
- {
- key: "座号",
- value1: "坐席1",
- value2: "坐席2",
- value3: "坐席3",
- value4: "坐席4",
- value5: "坐席5",
- value6: "坐席6",
- value7: "坐席7",
- value8: "坐席8",
- value9: "坐席9",
- value10: "坐席10",
- },
- {
- key: "姓名",
- value1: "张",
- value1: "李",
- },
- {
- key: "学号",
- value1: "2023004",
- value2: "2023007",
- }],
- tableArr3: [
- {
- key1: "一.排除故障(75分)",
- value11: "50",
- value12: "75",
- value13: "75",
- value14: "75",
- value15: "75",
- value16: "75",
- value17: "75",
- value18: "75",
- value19: "75",
- value110: "75",
- },
- {
- key1: "故障一未排除扣25分",
- value11: "50",
- value12: "75",
- value13: "75",
- value14: "75",
- value15: "75",
- value16: "75",
- value17: "75",
- value18: "75",
- value19: "75",
- value110: "75",
- },{
- key1: "故障二未排除扣25分",
- value11: "50",
- value12: "75",
- value13: "75",
- value14: "75",
- value15: "75",
- value16: "75",
- value17: "75",
- value18: "75",
- value19: "75",
- value110: "75",
- },{
- key1: "故障三未排除扣25分",
- value11: "50",
- value12: "75",
- value13: "75",
- value14: "75",
- value15: "75",
- value16: "75",
- value17: "75",
- value18: "75",
- value19: "75",
- value110: "75",
- },
- {
- key1: "二.修改报告表(15分)",
- value11: "15",
- value12: "15",
- value13: "15",
- value14: "15",
- value15: "15",
- value16: "15",
- value17: "15",
- value18: "15",
- value19: "15",
- value110: "15",
- },{
- key1: "故障现象少写或错写1条扣1分",
- value11: "50",
- value12: "15",
- value13: "15",
- value14: "15",
- value15: "15",
- value16: "15",
- value17: "15",
- value18: "15",
- value19: "15",
- value110: "15",
- },{
- key1: "可能原因少写或错写1条扣1分",
- value11: "50",
- value12: "75",
- value13: "15",
- value14: "15",
- value15: "15",
- value16: "15",
- value17: "15",
- value18: "15",
- value19: "15",
- value110: "15",
- },{
- key1: "故障部位少写或错写1条扣1分",
- value11: "50",
- value12: "15",
- value13: "15",
- value14: "15",
- value15: "15",
- value16: "15",
- value17: "15",
- value18: "15",
- value19: "15",
- value110: "15",
- },{
- key1: "排除方法少写或错写1条扣1分",
- value11: "15",
- value12: "15",
- value13: "15",
- value14: "15",
- value15: "15",
- value16: "15",
- value17: "15",
- value18: "15",
- value19: "15",
- value110: "15",
- },
- {
- key1: "修复结论错扣2分",
- value11: "50",
- value12: "15",
- value13: "15",
- value14: "15",
- value15: "15",
- value16: "15",
- value17: "15",
- value18: "15",
- value19: "15",
- value110: "15",
- },
- {
- key1: "三.维修时间(10分)",
- value11: "50",
- value12: "15",
- value13: "15",
- value14: "15",
- value15: "15",
- value16: "15",
- value17: "15",
- value18: "15",
- value19: "15",
- value110: "15",
- },
- {
- key1: "按每超时1分钟扣分的比例扣分",
- value11: "50",
- value12: "15",
- value13: "15",
- value14: "15",
- value15: "15",
- value16: "15",
- value17: "15",
- value18: "15",
- value19: "15",
- value110: "15",
- }],
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 用户表格数据
- userList: null,
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- // 部门名称
- deptName: undefined,
- // 默认密码
- initPassword: undefined,
- // 日期范围
- dateRange: [],
- // 岗位选项
- postOptions: [],
- // 角色选项
- roleOptions: [],
- // 表单参数
- form: {},
- defaultProps: {
- children: "children",
- label: "label"
- },
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- userName: undefined,
- phonenumber: undefined,
- status: undefined,
- },
- // 列信息
- columns: [
- { key: 0, label: `编号`, visible: true },
- { key: 1, label: `班级名称`, visible: true },
- { key: 2, label: `专业`, visible: true },
- { key: 3, label: `备注`, visible: true },
- { key: 4, label: `创建时间`, visible: true }
- ],
- tab_columns: [
- { key: 0, label: `座号`, visible: true },
- { key: 1, label: `模拟器状态`, visible: true },
- { key: 2, label: `学员学号`, visible: true },
- { key: 3, label: `学员姓名`, visible: true },
- { key: 4, label: `考试状态`, visible: true },
- { key: 5, label: `考试成绩`, visible: true },
- { key: 6, label: `出题题目`, visible: true },
- { key: 7, label: `故障现象`, visible: true },
- { key: 8, label: `可能原因`, visible: true },
- { key: 9, label: `故障部位`, visible: true },
- { key: 10, label: `排除方法`, visible: true },
- { key: 11, label: `修复结论`, visible: true },
- ],
- };
- },
- watch: {
- // 根据名称筛选部门树
- deptName(val) {
- this.$refs.tree.filter(val);
- }
- },
- created() {
- this.getList();
- // this.getDeptTree();
- this.getConfigKey("sys.user.initPassword").then(response => {
- this.initPassword = response.msg;
- });
- },
- methods: {
- // 刷新
- refreshTable1(){
- this.loading = true;
- listStudent(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.userList = response.rows;
- this.total = response.total;
- this.loading = false;
- }
- );
- },
- /** 查询用户列表 */
- getList() {
- this.loading = true;
- listStudent(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
- this.userList = response.rows;
- this.total = response.total;
- this.loading = false;
- }
- );
- },
- // 筛选节点
- filterNode(value, data) {
- if (!value) return true;
- return data.label.indexOf(value) !== -1;
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.form = {
- userId: undefined,
- userName: undefined,
- nickName: undefined,
- password: undefined,
- phonenumber: undefined,
- email: undefined,
- sex: undefined,
- status: "0",
- remark: undefined,
- postIds: [],
- roleIds: []
- };
- this.resetForm("form");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.dateRange = [];
- this.resetForm("queryForm");
- this.$refs.tree.setCurrentKey(null);
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map(item => item.userId);
- this.single = selection.length != 1;
- this.multiple = !selection.length;
- },
-
- /** 提交按钮 */
- submitForm: function() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- if (this.form.userId != undefined) {
- updateUser(this.form).then(response => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addUser(this.form).then(response => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
- }
- };
- </script>
|