Commit c0522af42ca6f5ea7d017dd749cd67c507ce640b
Merge branch 'develop_interview' of 39.98.150.180:antissoft/antissoft.dati.admin…
… into develop_interview
Showing
7 changed files
with
121 additions
and
98 deletions
.gitignore
src/api/TestPaper.js
| 1 | 1 | import request from '@/utils/request' |
| 2 | 2 | //编辑试卷 |
| 3 | 3 | export function EditTestPaper(params) { |
| 4 | - return request({ | |
| 5 | - url: `/TestPaper/AddTestPaper`, | |
| 6 | - method: 'post', | |
| 7 | - data: params | |
| 8 | - }) | |
| 4 | + return request({ | |
| 5 | + url: `/TestPaper/AddTestPaper`, | |
| 6 | + method: 'post', | |
| 7 | + data: params | |
| 8 | + }) | |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | export function getTestPaperList(params) { |
| 12 | - return request({ | |
| 13 | - url: `/TestPaper/List`, | |
| 14 | - // url: `/TestPaper/List?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}&sort=${params.sort}&sortOrder=${params.sortOrder}`, | |
| 15 | - method: 'get', | |
| 16 | - data: params | |
| 17 | - }) | |
| 12 | + console.log('getTestPaperList', params); | |
| 13 | + return request({ | |
| 14 | + url: `/TestPaper/List`, | |
| 15 | + // url: `/TestPaper/List?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}&sort=${params.sort}&sortOrder=${params.sortOrder}`, | |
| 16 | + method: 'get', | |
| 17 | + data: params, | |
| 18 | + params: params | |
| 19 | + }) | |
| 18 | 20 | } |
| 19 | 21 | export function getTestPaperClassList(params) { |
| 20 | - return request({ | |
| 21 | - url: `/TestPaperClass/List?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}`, | |
| 22 | - method: 'get', | |
| 23 | - data: params | |
| 24 | - }) | |
| 22 | + return request({ | |
| 23 | + url: `/TestPaperClass/List?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}`, | |
| 24 | + method: 'get', | |
| 25 | + data: params | |
| 26 | + }) | |
| 25 | 27 | } |
| 26 | 28 | //获取分类信息 |
| 27 | 29 | export function GetTestPaperClassById(id) { |
| 28 | - return request({ | |
| 29 | - url: `/TestPaperClass/Get/${id}`, | |
| 30 | - method: 'get', | |
| 31 | - }) | |
| 30 | + return request({ | |
| 31 | + url: `/TestPaperClass/Get/${id}`, | |
| 32 | + method: 'get', | |
| 33 | + }) | |
| 32 | 34 | } |
| 33 | 35 | export function UpdateTestPaperClass(params) { |
| 34 | - return request({ | |
| 35 | - url: `/TestPaperClass/Update`, | |
| 36 | - method: 'post', | |
| 37 | - data: params | |
| 38 | - }) | |
| 36 | + return request({ | |
| 37 | + url: `/TestPaperClass/Update`, | |
| 38 | + method: 'post', | |
| 39 | + data: params | |
| 40 | + }) | |
| 39 | 41 | } |
| 40 | 42 | export function DeleteTestPaperClass(ids) { |
| 41 | - return request({ | |
| 42 | - url: `/TestPaperClass/Delete?ids=${ids}`, | |
| 43 | - method: 'post', | |
| 44 | - }) | |
| 43 | + return request({ | |
| 44 | + url: `/TestPaperClass/Delete?ids=${ids}`, | |
| 45 | + method: 'post', | |
| 46 | + }) | |
| 45 | 47 | } |
| 46 | 48 | export function CreateTestPaperClass(params) { |
| 47 | - return request({ | |
| 48 | - url: `/TestPaperClass/Create`, | |
| 49 | - method: 'post', | |
| 50 | - data: params | |
| 51 | - }) | |
| 49 | + return request({ | |
| 50 | + url: `/TestPaperClass/Create`, | |
| 51 | + method: 'post', | |
| 52 | + data: params | |
| 53 | + }) | |
| 52 | 54 | } |
| 53 | 55 | export function GetToplevel() { |
| 54 | - return request({ | |
| 55 | - url: `/TestPaperClass/GetToplevel`, | |
| 56 | - method: 'get', | |
| 57 | - }) | |
| 56 | + return request({ | |
| 57 | + url: `/TestPaperClass/GetToplevel`, | |
| 58 | + method: 'get', | |
| 59 | + }) | |
| 58 | 60 | } |
| 59 | 61 | export function GetTestManagerByAdmin(data) { |
| 60 | - return request({ | |
| 61 | - url: `/TestPaper/GetTestManagerByAdmin?TestPaperId=`+data.TestPaperId, | |
| 62 | - method: 'get', | |
| 63 | - data | |
| 64 | - }) | |
| 62 | + return request({ | |
| 63 | + url: `/TestPaper/GetTestManagerByAdmin?TestPaperId=` + data.TestPaperId, | |
| 64 | + method: 'get', | |
| 65 | + data | |
| 66 | + }) | |
| 65 | 67 | } |
| 66 | 68 | |
| 67 | 69 | // POST /api/TestPaper/GetTestPaperListByPlateClass //获取模块下面的试卷列表 |
| 68 | 70 | export function GetTestPaperListByPlateClass(data) { |
| 69 | - return request({ | |
| 70 | - url: `/TestPaper/GetTestPaperListByPlateClass`, | |
| 71 | - method: 'post', | |
| 72 | - data | |
| 73 | - }) | |
| 71 | + return request({ | |
| 72 | + url: `/TestPaper/GetTestPaperListByPlateClass`, | |
| 73 | + method: 'post', | |
| 74 | + data | |
| 75 | + }) | |
| 74 | 76 | } |
| 75 | 77 | //POST /api/TestPaper/AddTestPaperInfo 往模块中添加试卷 |
| 76 | 78 | export function AddTestPaperInfo(data) { |
| 77 | - return request({ | |
| 78 | - url: `/TestPaper/AddTestPaperInfo`, | |
| 79 | - method: 'post', | |
| 80 | - data | |
| 81 | - }) | |
| 79 | + return request({ | |
| 80 | + url: `/TestPaper/AddTestPaperInfo`, | |
| 81 | + method: 'post', | |
| 82 | + data | |
| 83 | + }) | |
| 82 | 84 | } |
| 83 | 85 | |
| 84 | 86 | |
| 85 | 87 | //POST /api/TestPaper/Update 编辑 |
| 86 | 88 | export function TestPaperUpdate(data) { |
| 87 | - return request({ | |
| 88 | - url: `/TestPaper/Update`, | |
| 89 | - method: 'post', | |
| 90 | - data | |
| 91 | - }) | |
| 89 | + return request({ | |
| 90 | + url: `/TestPaper/Update`, | |
| 91 | + method: 'post', | |
| 92 | + data | |
| 93 | + }) | |
| 92 | 94 | } |
| 93 | 95 | |
| 94 | 96 | // get /api/TestPaper/DeleteTestPaper 标记删除 |
| 95 | 97 | export function DeleteTestPaper(data) { |
| 96 | - return request({ | |
| 97 | - url: `/TestPaper/DeleteTestPaper?TestPaperId=`+data, | |
| 98 | - method: 'get', | |
| 99 | - data | |
| 100 | - }) | |
| 98 | + return request({ | |
| 99 | + url: `/TestPaper/DeleteTestPaper?TestPaperId=` + data, | |
| 100 | + method: 'get', | |
| 101 | + data | |
| 102 | + }) | |
| 101 | 103 | } |
| 102 | 104 | // POST /api/TestPaper/ReleaseTestPaper 上架试卷 |
| 103 | 105 | export function ReleaseTestPaper(data) { |
| 104 | - return request({ | |
| 105 | - url: `/TestPaper/ReleaseTestPaper?TestPaperId=`+data, | |
| 106 | - method: 'post', | |
| 107 | - data | |
| 108 | - }) | |
| 106 | + return request({ | |
| 107 | + url: `/TestPaper/ReleaseTestPaper?TestPaperId=` + data, | |
| 108 | + method: 'post', | |
| 109 | + data | |
| 110 | + }) | |
| 109 | 111 | } |
| 110 | 112 | |
| 111 | 113 | |
| 112 | 114 | //POST /api/TestPaperDetail/Delete |
| 113 | 115 | |
| 114 | 116 | export function DeleteTestPaperDetail(data) { |
| 115 | - return request({ | |
| 116 | - url: `/TestPaperDetail/DeleteTestPaperDetail`, | |
| 117 | - method: 'post', | |
| 118 | - params:data | |
| 119 | - }) | |
| 120 | -} | |
| 117 | + return request({ | |
| 118 | + url: `/TestPaperDetail/DeleteTestPaperDetail`, | |
| 119 | + method: 'post', | |
| 120 | + params: data | |
| 121 | + }) | |
| 122 | +} | |
| 121 | 123 | \ No newline at end of file | ... | ... |
src/views/TestPaper/ManualTestPaper.vue
| ... | ... | @@ -64,6 +64,7 @@ |
| 64 | 64 | <span style="margin-right: 10px;">单选题:{{TestPaper.SingleNumber}}</span> |
| 65 | 65 | <span style="margin-right: 10px;">多选题:{{TestPaper.MultipleNumber}}</span> |
| 66 | 66 | <span style="margin-right: 10px;">主观题:{{TestPaper.SubjectiveNumber}}</span> |
| 67 | + <span style="margin-right: 10px;">主观题:{{TestPaper.VoiceNumber}}</span> | |
| 67 | 68 | </el-form-item> |
| 68 | 69 | <el-form-item label="题目总分:" class="el-form-item-custom"> |
| 69 | 70 | {{TestPaper.TotalScore || ''}} |
| ... | ... | @@ -231,6 +232,7 @@ |
| 231 | 232 | SingleNumber: 0, |
| 232 | 233 | MultipleNumber: 0, |
| 233 | 234 | SubjectiveNumber: 0, |
| 235 | + VoiceNumber:0, | |
| 234 | 236 | OriginalPrice: "0", |
| 235 | 237 | PresentPrice: "0", |
| 236 | 238 | MembershipPrice: "0", |
| ... | ... | @@ -369,6 +371,11 @@ |
| 369 | 371 | this.dialogTableVisible = false; |
| 370 | 372 | if (!list.length) { |
| 371 | 373 | this.$message.warning('所选分类没有试题'); |
| 374 | + }else{ | |
| 375 | + this.TestPaper.SingleNumber = list.filter(t=>t.subjectType == 1).length; | |
| 376 | + this.TestPaper.MultipleNumber = list.filter(t=>t.subjectType == 2).length; | |
| 377 | + this.TestPaper.SubjectiveNumber = list.filter(t=>t.subjectType == 3).length; | |
| 378 | + this.TestPaper.VoiceNumber = list.filter(t=>t.subjectType == 4).length; | |
| 372 | 379 | } |
| 373 | 380 | }); |
| 374 | 381 | }, |
| ... | ... | @@ -506,6 +513,10 @@ |
| 506 | 513 | if (e.item._underlying_vm_.subjectType == 3) { |
| 507 | 514 | this.TestPaper.SubjectiveNumber -= 1; |
| 508 | 515 | } |
| 516 | + if (e.item._underlying_vm_.subjectType == 4) { | |
| 517 | + this.TestPaper.VoiceNumber -= 1; | |
| 518 | + } | |
| 519 | + | |
| 509 | 520 | this.TestPaper.TotalScore -= e.item._underlying_vm_.fraction; |
| 510 | 521 | this.TestPaper.QuestionBankIds = this.arr2.map((u) => u.id); |
| 511 | 522 | }, |
| ... | ... | @@ -521,6 +532,9 @@ |
| 521 | 532 | if (e.item._underlying_vm_.subjectType == 3) { |
| 522 | 533 | this.TestPaper.SubjectiveNumber += 1; |
| 523 | 534 | } |
| 535 | + if (e.item._underlying_vm_.subjectType == 4) { | |
| 536 | + this.TestPaper.VoiceNumber += 1; | |
| 537 | + } | |
| 524 | 538 | this.TestPaper.TotalScore += e.item._underlying_vm_.fraction; |
| 525 | 539 | |
| 526 | 540 | this.TestPaper.QuestionBankIds = this.arr2.map((u) => u.id); |
| ... | ... | @@ -548,6 +562,9 @@ |
| 548 | 562 | if (rs.subjectType == 3) { |
| 549 | 563 | this.TestPaper.SubjectiveNumber += 1; |
| 550 | 564 | } |
| 565 | + if (rs.subjectType == 4) { | |
| 566 | + this.TestPaper.VoiceNumber += 1; | |
| 567 | + } | |
| 551 | 568 | }); |
| 552 | 569 | }); |
| 553 | 570 | } | ... | ... |
src/views/TestPaper/TestPaperList.vue
| ... | ... | @@ -21,6 +21,7 @@ |
| 21 | 21 | <span>{{ scope.row.TotalScore }}</span> |
| 22 | 22 | </template> |
| 23 | 23 | </el-table-column> |
| 24 | + | |
| 24 | 25 | <el-table-column prop="date" label="单选题数量" width="100"> |
| 25 | 26 | <template slot-scope="scope"> |
| 26 | 27 | <span>{{ scope.row.SingleNumber }}</span> |
| ... | ... | @@ -36,6 +37,16 @@ |
| 36 | 37 | <span>{{ scope.row.SubjectiveNumber }}</span> |
| 37 | 38 | </template> |
| 38 | 39 | </el-table-column> |
| 40 | + <el-table-column prop="date" label="语音题数量" width="100"> | |
| 41 | + <template slot-scope="scope"> | |
| 42 | + <span>{{ scope.row.VoiceNumber }}</span> | |
| 43 | + </template> | |
| 44 | + </el-table-column> | |
| 45 | + <el-table-column prop="date" label="工种" width="80"> | |
| 46 | + <template slot-scope="scope"> | |
| 47 | + <span>{{ scope.row.UserTypeOfWorkName }}</span> | |
| 48 | + </template> | |
| 49 | + </el-table-column> | |
| 39 | 50 | <el-table-column prop="TestPaperClassId" label="分类" width="100"> |
| 40 | 51 | <template slot-scope="scope"> |
| 41 | 52 | <span>{{ scope.row.TestPaperClassId | typeFilters}}</span> |
| ... | ... | @@ -168,7 +179,8 @@ |
| 168 | 179 | import { GetTypeSetting |
| 169 | 180 | } from '@/api/user' |
| 170 | 181 | import { formatTime } from '@/utils/util' |
| 171 | - let that | |
| 182 | + let that={}; | |
| 183 | + let list = []; | |
| 172 | 184 | export default { |
| 173 | 185 | data() { |
| 174 | 186 | return { |
| ... | ... | @@ -219,8 +231,10 @@ |
| 219 | 231 | // sortOrder: 1, |
| 220 | 232 | keyword: "" |
| 221 | 233 | } |
| 222 | - getTestPaperClassList(parameter).then(res => { | |
| 223 | - this.list = res.data.data; | |
| 234 | + GetToplevel(parameter).then(res => { | |
| 235 | + console.log('gettoplevel',res); | |
| 236 | + list = res.data.data; | |
| 237 | + this.$forceUpdate(); | |
| 224 | 238 | }); |
| 225 | 239 | |
| 226 | 240 | GetTypeSetting({}).then(res=>{ |
| ... | ... | @@ -231,16 +245,10 @@ |
| 231 | 245 | }, |
| 232 | 246 | filters: { |
| 233 | 247 | typeFilters(val) { |
| 234 | - var that = this; | |
| 235 | 248 | try { |
| 236 | - if (!that.list) return '未知'; | |
| 237 | - const data = that.list.filter(t => t.id == val)[0] | |
| 238 | - if (data) { | |
| 239 | - return data.ClassTitle | |
| 240 | - } else { | |
| 241 | - return '未知' | |
| 242 | - } | |
| 249 | + return list.find(t=>t.id == val).ClassTitle || '未知'; | |
| 243 | 250 | } catch (e) { |
| 251 | + console.log(e); | |
| 244 | 252 | return '未知' |
| 245 | 253 | } |
| 246 | 254 | } | ... | ... |
src/views/user/picuserimport.vue
| ... | ... | @@ -339,12 +339,10 @@ export default { |
| 339 | 339 | this.table_data = []; |
| 340 | 340 | } else { |
| 341 | 341 | console.log(index, row); |
| 342 | - this.table_data.splice(index, 1); | |
| 342 | + | |
| 343 | 343 | } |
| 344 | - UserInfo_BatchToUser(row.id); | |
| 345 | - this.$message({ | |
| 346 | - message: "入库成功!", | |
| 347 | - type: "success", | |
| 344 | + UserInfo_BatchToUser(row.id).then(res=>{ | |
| 345 | + this.table_data.splice(index, 1); | |
| 348 | 346 | }); |
| 349 | 347 | }, |
| 350 | 348 | ... | ... |
src/views/user/userlist.vue
| ... | ... | @@ -191,12 +191,9 @@ |
| 191 | 191 | |
| 192 | 192 | <el-dialog title="邀请面试-试卷选择" :visible.sync="dialogFormVisible"> |
| 193 | 193 | <el-form :model="form"> |
| 194 | - <!-- <el-form-item label="活动名称" :label-width="formLabelWidth"> | |
| 195 | - <el-input v-model="form.name" autocomplete="off"></el-input> | |
| 196 | - </el-form-item> --> | |
| 197 | 194 | <el-form-item label="试卷"> |
| 198 | 195 | <el-select v-model="form.TestPaperId" placeholder="请选择试卷" style="width: 80%"> |
| 199 | - <el-option :value="item.id" v-for="item in testpaperlist">{{ | |
| 196 | + <el-option :value="item.id" :label="'['+item.id+']'+item.TestPaperTitle" v-for="item in testpaperlist">{{ | |
| 200 | 197 | "[" + item.id + "] " + (item.TestPaperTitle || "未命名") |
| 201 | 198 | }}</el-option> |
| 202 | 199 | </el-select> | ... | ... |
vue.config.js
| ... | ... | @@ -38,16 +38,16 @@ module.exports = { |
| 38 | 38 | }, |
| 39 | 39 | proxy: { |
| 40 | 40 | '/development': { |
| 41 | - // target: `http://inteview.t1j2.com/`, //后台服务地址 | |
| 42 | - target:'http://localhost:8877', | |
| 41 | + target: `http://inteview.t1j2.com/`, //后台服务地址 | |
| 42 | + // target:'http://localhost:8877', | |
| 43 | 43 | changeOrigin: true, |
| 44 | 44 | pathRewrite: { |
| 45 | 45 | '^/development': '' |
| 46 | 46 | } |
| 47 | 47 | }, |
| 48 | 48 | '/api': { |
| 49 | - // target: `http://inteview.t1j2.com/`, //后台服务地址 | |
| 50 | - target: 'http://localhost:8877', | |
| 49 | + target: `http://inteview.t1j2.com/`, //后台服务地址 | |
| 50 | + // target: 'http://localhost:8877', | |
| 51 | 51 | changeOrigin: true, |
| 52 | 52 | pathRewrite: {} |
| 53 | 53 | } | ... | ... |