Commit 94c54e928adafc245e50889a4bb6ef99d0220258

Authored by 周超
1 parent 46c73197

1

src/api/QuestionBank.js
... ... @@ -39,6 +39,20 @@ export function DelQuestionBankEvent(id) {
39 39 method: 'post',
40 40 })
41 41 }
  42 +//删除题目,标记删除
  43 +export function ChangeQuestionBankClass(id,type) {
  44 + return request({
  45 + url: `/QuestionBank/ChangeQuestionBankClass?id=${id}&type=${type}`,
  46 + method: 'post',
  47 + })
  48 +}
  49 +//删除题目,标记删除
  50 +export function ChangeQuestionBankType(id,type) {
  51 + return request({
  52 + url: `/QuestionBank/ChangeQuestionBankType?id=${id}&type=${type}`,
  53 + method: 'post',
  54 + })
  55 +}
42 56 //读取题目信息
43 57 export function GetQuestionBankById(id) {
44 58 return request({
... ...
src/views/QuestionBank/QuestionDimension.vue
... ... @@ -142,14 +142,14 @@
142 142 >
143 143 </el-cascader>
144 144 </el-form-item>
145   - <el-form-item label="板块分类" class="el-form-item-custom">
  145 + <!-- <el-form-item label="板块分类" class="el-form-item-custom">
146 146 <el-select
147 147 v-model="TestPaper.PlateClass"
148 148 placeholder="请选择板块分类"
149 149 >
150 150 <el-option label="面试题" value="4"></el-option>
151 151 </el-select>
152   - </el-form-item>
  152 + </el-form-item> -->
153 153 <el-form-item label="试卷原价:" prop="OriginalPrice" v-show="false">
154 154 <el-input
155 155 class="testpaper-input"
... ...
src/views/QuestionBank/components/EditDimension.vue
1 1 <template>
2   - <el-dialog title="维度编辑" :visible.sync="dialogFormVisible" @closed="dialogFormVisible = false" width="75%">
  2 + <el-dialog title="维度编辑" :visible.sync="dialogFormVisible" @closed="handleclose" width="75%">
3 3 <el-form :model="data">
4 4 <el-form-item label="名称">
5 5 <el-input v-model="data.ClassificationName"></el-input>
... ... @@ -158,6 +158,10 @@
158 158 // this.show();
159 159 },
160 160 methods: {
  161 + handleclose(){
  162 + this.dialogFormVisible = false;
  163 + this.$emit('close',this.data);
  164 + },
161 165 handleSave() {
162 166 if (!this.data.ClassificationName) {
163 167 this.$message.warning('请填写名称!', "消息");
... ... @@ -168,6 +172,7 @@
168 172 if (res.data.code == 200) {
169 173 this.$message.success('保存成功!', "消息");
170 174 this.dialogFormVisible = false;
  175 + this.$emit('save',this.data);
171 176 this.data = {
172 177 rules: [
173 178 {
... ...
src/views/QuestionBank/index.vue
... ... @@ -13,18 +13,22 @@
13 13 <el-tab-pane label="专业类" name="first"></el-tab-pane>
14 14 <el-tab-pane label="测评类" name="second"></el-tab-pane>
15 15 </el-tabs>
16   - <el-tree :data="activeTab == 'first' ? firstTreeData : secondTreeData"
  16 + <el-button type="button" size="mini" style="width:100%;margin-bottom:10px"
  17 + @click="showClassDialog(null,0,activeTab == 'first' ? 0 : 2)">
  18 + 添加顶级
  19 + </el-button>
  20 + <el-tree :data="activeTab == 'first' ? firstTreeData : secondTreeData" :default-expanded-keys="currentExpend"
17 21 :props="activeTab == 'first' ? firstTreeData : secondTreeData" @node-click="handleNodeClick"
18   - class="eltree" :expand-on-click-node="false">
  22 + class="eltree" :expand-on-click-node="false" ref="tree">
19 23 <span class="custom-tree-node" slot-scope="{ node, data }">
20 24 <span>{{ node.label }}</span>
21 25 <span style="">
22 26 <!-- v-if="activeTab == 'first'?true:node.level<2?true:false" -->
23   - <el-button type="text" size="mini" @click="showClassDialog(node)"
24   - >
  27 + <el-button type="text" size="mini" @click="showClassDialog(node)">
25 28 添加下级
26 29 </el-button>
27   - <el-button type="text" v-if="activeTab == 'second'" @click="handleEditDimension(node, data)">编辑
  30 + <el-button type="text" v-if="activeTab == 'second' || 1==1" @click="handleEditDimension(node, data)">
  31 + 编辑
28 32 </el-button>
29 33 <el-button type="text" size="mini" @click="() => handleDeleteQuestionClass(node, data)">
30 34 删除
... ... @@ -38,8 +42,16 @@
38 42 <el-col :span="18">
39 43 <div class="grid-content bg-purple-light">
40 44 <div class="seetingsDiv" style="">
  45 +
  46 +
41 47 <el-button type="primary" @click="AddSubject">添加题目
42 48 </el-button>
  49 + <el-button type="danger" @click="handleDelete">批量删除
  50 + </el-button>
  51 + <el-button type="danger" @click="handleChangeCat">批量修改分类
  52 + </el-button>
  53 + <el-button type="danger" @click="handleChangeType">批量修改题型
  54 + </el-button>
43 55 </div>
44 56 <div class="areadiv" :style="{ height: TableColHeight + 'px' }">
45 57 <el-table :data="QuestList" id="QuestionTable" border style="
... ... @@ -47,7 +59,8 @@
47 59 border-radius: 5px;
48 60 box-shadow: 0 0 10px #efefef;
49 61 margin-top: 10px;
50   - " :header-cell-class-name="headerStyle" :stripe="true">
  62 + " :header-cell-class-name="headerStyle" :stripe="true" ref="table">
  63 + <el-table-column type="selection" width="55"> </el-table-column>
51 64 <el-table-column prop="date" label="ID" width="80">
52 65 <template slot-scope="scope">
53 66 <span>{{ scope.row.id }}</span>
... ... @@ -148,9 +161,7 @@
148 161 :close-on-click-modal="false">
149 162 <el-form ref="Dataform" :model="Dataform" label-width="60px">
150 163 <div style="padding:10px">
151   - <el-alert v-if="FormClassType==2"
152   - title="选项的维度分值如不设置将按照分值规则自动计算"
153   - type="warning"></el-alert>
  164 + <el-alert v-if="FormClassType==2" title="选项的维度分值如不设置将按照分值规则自动计算" type="warning"></el-alert>
154 165 </div>
155 166 <el-form-item label="题目">
156 167 <el-input v-model="Dataform.subject" placeholder="请输入题目名称"></el-input>
... ... @@ -178,12 +189,13 @@
178 189 <template slot="prepend">{{ scope.row.option }}</template>
179 190 </el-input>
180 191  
181   - <el-input placeholder="维度分值" v-model="scope.row.score" class="optionInput"
  192 + <el-input placeholder="维度分值" v-model="scope.row.score" class="optionInput"
182 193 style="width:21% !important;margin-left:1%">
183 194 </el-input>
184 195 <!-- v-if="FormClassType==2" -->
185   - <el-select v-model="scope.row.scorerule" class="optionInput" placeholder="分值规则" style="width:20% !important;margin-left:1%">
186   - <el-option label="" >不设置</el-option>
  196 + <el-select v-model="scope.row.scorerule" class="optionInput" placeholder="分值规则"
  197 + style="width:20% !important;margin-left:1%">
  198 + <el-option label="">不设置</el-option>
187 199 <el-option v-for="sritem in scoreRules" :label="sritem" :value="sritem">{{sritem}}</el-option>
188 200 </el-select>
189 201 <i class="el-icon-circle-plus el-icon" @click="Addlist"></i>
... ... @@ -220,7 +232,44 @@
220 232 </el-button>
221 233 <div style="clear: both"></div>
222 234 </el-dialog>
223   - <EditDimension ref="editDimensionDialog" :model="currentEditDimension"></EditDimension>
  235 +
  236 + <el-dialog title="批量设置分类" :visible.sync="dialogsubjectlVisibleSetCat" @close="closeDialogCat" width="800px"
  237 + :close-on-click-modal="false">
  238 + <el-form ref="Dataform" :model="Dataform" label-width="60px">
  239 +
  240 + <el-form-item label="分类" style="padding-top: 5px">
  241 + <el-cascader v-model="QuestionClassId" style="width: 400px" :props="{ emitPath: false ,checkStrictly:true}"
  242 + :clearable="true" :options="QuestionClass">
  243 + </el-cascader>
  244 + </el-form-item>
  245 +
  246 + </el-form>
  247 + <el-button @click="handleSetClass" style="margin: 10px 0 0 0; float: right" type="primary">确定
  248 + </el-button>
  249 + <div style="clear: both"></div>
  250 + </el-dialog>
  251 +
  252 + <el-dialog title="批量设置题型" :visible.sync="dialogsubjectlVisibleSetType" @close="closeDialogType" width="800px"
  253 + :close-on-click-modal="false">
  254 + <el-form ref="Dataform" :model="Dataform" label-width="60px">
  255 +
  256 + <el-form-item label="题型" style="padding-top: 5px">
  257 + <el-select v-model="QuestionTypeId" placeholder="请选择题型">
  258 + <el-option label="请选择" value=""></el-option>
  259 + <el-option label="单选题" :value="1"></el-option>
  260 + <el-option label="多选题" :value="2"></el-option>
  261 + <el-option label="主观题" :value="3"></el-option>
  262 + <el-option label="语音题" :value="4"></el-option>
  263 + </el-select>
  264 + </el-form-item>
  265 +
  266 + </el-form>
  267 + <el-button @click="handleSetType" style="margin: 10px 0 0 0; float: right" type="primary">确定
  268 + </el-button>
  269 + <div style="clear: both"></div>
  270 + </el-dialog>
  271 + <EditDimension ref="editDimensionDialog" :model="currentEditDimension" @close="closeEditDim" @save="saveEditDim">
  272 + </EditDimension>
224 273 </div>
225 274 </template>
226 275  
... ... @@ -231,7 +280,7 @@
231 280 getQuestionClassList,
232 281 DelQuestionBankEvent,
233 282 GetQuestionBankById,
234   - CreateQuestionClass,
  283 + CreateQuestionClass, ChangeQuestionBankClass, ChangeQuestionBankType
235 284 } from "@/api/QuestionBank";
236 285 import { parseTime } from "@/utils/index.js";
237 286 import EditDimension from "./components/EditDimension.vue";
... ... @@ -257,6 +306,13 @@
257 306 },
258 307 Count: 0,
259 308 QuestList: [],
  309 + QuestionClassId: 0,
  310 + dialogsubjectlVisibleSetCat: false,
  311 +
  312 + QuestionTypeId: '',
  313 + dialogsubjectlVisibleSetType: false,
  314 +
  315 +
260 316 dialogsubjectlVisible: false,
261 317 dialogClassIVIsible: false,
262 318 OptionVisible: true,
... ... @@ -271,13 +327,13 @@
271 327 fraction: 0,
272 328 singleFraction: 0,
273 329 addTime: "2021-11-12",
274   - state: 1,
  330 + state: 1,
275 331 },
276 332 subjectContent: [
277 333 {
278 334 option: "A",
279 335 optionContent: "",
280   - scorerule:'高'
  336 + scorerule: '高'
281 337 },
282 338 ],
283 339 QuestionClass: [],
... ... @@ -292,7 +348,9 @@
292 348 firstTreeData: [],
293 349 secondTreeData: [],
294 350 CreatClassId: 0,
295   - scoreRules:['高','中','低'],
  351 + scoreRules: ['高', '中', '低'],
  352 + currentEditNode: undefined,
  353 + currentExpend:[1]
296 354 };
297 355 },
298 356 created() { },
... ... @@ -309,7 +367,99 @@
309 367 this.getQuestionClassListHeadler();
310 368 },
311 369 methods: {
312   - AddSubject() {
  370 + closeEditDim(data) {
  371 + },
  372 +
  373 + saveEditDim(data) {
  374 + // if(this.currentEditNode && this.currentEditNode.parent)
  375 + // this.currentExpend=[this.currentEditNode.parent.data.id];
  376 + // {
  377 + // this.currentEditNode.label = data.ClassificationName;
  378 + // this.currentEditNode.data.ClassificationName = data.ClassificationName;
  379 + // if(this.currentEditNode.parent)
  380 + // {
  381 + // this.currentEditNode.parent.loaded =false;
  382 + // this.currentEditNode.parent.expand();
  383 + // }
  384 + // }
  385 + this.getQuestionClassListHeadler();
  386 + this.$forceUpdate();
  387 + },
  388 + handleDelete() {
  389 + var rows = this.$refs.table.selection;
  390 + if (!rows || rows.length < 1) {
  391 + this.$message.warning('至少选择一项进行操作!');
  392 + return;
  393 + }
  394 + this.$confirm("确认删除选择的题目吗?", "提示", {
  395 + confirmButtonText: "确定",
  396 + cancelButtonText: "取消",
  397 + type: "warning",
  398 + }).then(() => {
  399 + DelQuestionBankEvent(rows.map(o => o.id).join(',')).then((o) => {
  400 + this.$message.success("删除成功");
  401 + this.GetList();
  402 + });
  403 + });
  404 +
  405 + },
  406 + handleSetClass() {
  407 + var rows = this.$refs.table.selection;
  408 + if (!this.QuestionClassId || this.QuestionClassId < 1) {
  409 + this.$message.warning('至少选择一个分类进行操作!');
  410 + return;
  411 + }
  412 + this.$confirm("确认批量修改题目分类吗?", "提示", {
  413 + confirmButtonText: "确定",
  414 + cancelButtonText: "取消",
  415 + type: "warning",
  416 + }).then(() => {
  417 + ChangeQuestionBankClass(rows.map(o => o.id).join(','), this.QuestionClassId).then((o) => {
  418 + this.$message.success("修改成功");
  419 + this.GetList();
  420 + this.dialogsubjectlVisibleSetCat = false;
  421 + });
  422 + });
  423 + },
  424 + handleChangeCat() {
  425 + var rows = this.$refs.table.selection;
  426 + if (!rows || rows.length < 1) {
  427 + this.$message.warning('至少选择一项进行操作!');
  428 + return;
  429 + }
  430 + this.dialogsubjectlVisibleSetCat = true;
  431 + },
  432 +
  433 +
  434 + handleSetType() {
  435 + var rows = this.$refs.table.selection;
  436 + if (!this.QuestionTypeId || this.QuestionTypeId < 1) {
  437 + this.$message.warning('至少选择一个类型进行操作!');
  438 + return;
  439 + }
  440 + this.$confirm("确认批量修改题目类型吗?", "提示", {
  441 + confirmButtonText: "确定",
  442 + cancelButtonText: "取消",
  443 + type: "warning",
  444 + }).then(() => {
  445 + ChangeQuestionBankType(rows.map(o => o.id).join(','), this.QuestionTypeId).then((o) => {
  446 + this.$message.success("修改成功");
  447 + this.GetList();
  448 + this.dialogsubjectlVisibleSetType = false;
  449 + });
  450 + });
  451 + },
  452 + handleChangeType() {
  453 + var rows = this.$refs.table.selection;
  454 + if (!rows || rows.length < 1) {
  455 + this.$message.warning('至少选择一项进行操作!');
  456 + return;
  457 + }
  458 + this.dialogsubjectlVisibleSetType = true;
  459 + },
  460 +
  461 +
  462 + AddSubject() {
313 463 this.FormClassType = 0;
314 464 // if(!this.Dataform.scoperule)
315 465 // this.Dataform.scoperule='高';
... ... @@ -325,6 +475,7 @@
325 475 // this.$refs.editDimensionDialog.dialogFormVisible = true;
326 476 this.$refs.editDimensionDialog.show(data.id);
327 477 this.currentEditDimension = data;
  478 + this.currentEditNode = node;
328 479 },
329 480 //切换分类
330 481 handleTabsClick(e) {
... ... @@ -386,10 +537,13 @@
386 537 this.dialogsubjectlVisible = true;
387 538 });
388 539 },
389   - showClassDialog(node) {
  540 + showClassDialog(node, parent, type) {
390 541 this.dialogClassIVIsible = true;
391 542 console.log(node);
392   - this.QuestionClassInfo.ParentId = node.data.value;
  543 + if (parent && parent == 0) this.QuestionClassInfo.ParentId = 0;
  544 + if (node)
  545 + this.QuestionClassInfo.ParentId = node.data.value;
  546 + if (type != undefined) this.QuestionClassInfo.ClassType = type;
393 547 // alert(this.QuestionClassInfo.ParentId);
394 548 },
395 549 //关闭弹框的事件
... ... @@ -402,6 +556,16 @@
402 556 this.OptionVisible = true;
403 557 this.GroupVisible = true;
404 558 },
  559 + closeDialogCat() {
  560 + this.QuestionClassId = 0;
  561 + this.dialogsubjectlVisibleSetCat = false;
  562 + },
  563 + closeDialogType() {
  564 + this.QuestionClassTypeId = '';
  565 + this.dialogsubjectlVisibleSetType = false;
  566 + },
  567 +
  568 +
405 569 //选择题目类型来判断是否显示部分表单
406 570 changeQuestionType(val) {
407 571 if (val == 3 || val == 4) {
... ... @@ -513,14 +677,38 @@
513 677 t.label = t.ClassificationName;
514 678 return t;
515 679 });
516   - let firstClass = list.find((t) => t.id == 6);
517   - firstClass.children = this.getSubTree(6, list);
518   - let secondClass = list.find((t) => t.id == 1);
519   - secondClass.children = this.getSubTree(1, list);
  680 + // let firstClass = list.find((t) => t.id == 6);
  681 + // firstClass.children = this.getSubTree(6, list);
  682 + // let secondClass = list.find((t) => t.id == 1);
  683 + // secondClass.children = this.getSubTree(1, list);
520 684 this.QuestionClass = list;
521 685  
522   - this.firstTreeData = [firstClass];
523   - this.secondTreeData = [secondClass];
  686 + var firstlist = list.filter(o => o.ClassType == 0 && o.ParentId == 0).map(o => {
  687 + o.children = this.getSubTree(o.id, list);
  688 + return o;
  689 + });
  690 +
  691 + var twolist = list.filter(o => o.ClassType == 2 && o.ParentId == 0).map(o => {
  692 + o.children = this.getSubTree(o.id, list);
  693 + return o;
  694 +
  695 + });
  696 +
  697 + this.firstTreeData = firstlist;
  698 + this.secondTreeData = twolist;
  699 + // _this.$nextTick(()=>{
  700 + // if(_this.currentEditNode){
  701 + // _this.$refs.tree.getNode(_this.currentEditNode.parent).loaded = false
  702 + // _this.$refs.tree.getNode(_this.currentEditNode.parent).expand();
  703 + // _this.$refs.tree.getNode(_this.currentEditNode.parent).expanded=true;
  704 + // _this.$forceUpdate()
  705 +
  706 + // }
  707 +
  708 + // });
  709 +
  710 + // this.firstTreeData = [firstClass];
  711 + // this.secondTreeData = [secondClass];
524 712 });
525 713 },
526 714 },
... ...
src/views/TestPaper/ManualTestPaper.vue
... ... @@ -30,16 +30,17 @@
30 30 <el-col :span="10" :style="{'height':contentHeight+'px'}">
31 31 <div class="grid-content bg-purple">
32 32 <div class="areahead">
33   - <span v-show="!edit" style="font-weight: bold;">{{ TestPaper.TestPaperTitle }}</span>
34   - <el-input v-show="edit" style="width: 400px;" v-model="TestPaper.TestPaperTitle"></el-input>
  33 + <!-- <span v-show="!edit" style="font-weight: bold;">{{ TestPaper.TestPaperTitle }}</span> -->
  34 + <!-- <el-input v-show="edit" style="width: 400px;" v-model="TestPaper.TestPaperTitle"></el-input>
35 35 <i :class="{'el-icon-edit': !edit, 'el-icon-check': edit}" @click="edit = !edit"
36   - style="margin-left: 5px;cursor: pointer;"></i>
  36 + style="margin-left: 5px;cursor: pointer;"></i> -->
  37 + 题目内容
37 38 </div>
38 39  
39 40 <draggable :options="{animation:380}" group="itxst" v-model="arr2" class="infinite-list" @end="end2"
40 41 @add="ComeHere" :style="{'height':contentHeight-60+'px'}" style="overflow:auto;padding-top: 10px;">
41   - <li v-for="i in arr2" class="infinite-list-item">
42   - <label>[{{i.subjectName}}]{{ i.subject }}</label>
  42 + <li v-for="(i,index) in arr2" class="infinite-list-item">
  43 + <label> {{index+1}}. [{{i.subjectName}}]{{ i.subject }}</label>
43 44 <div v-for="item in JSON.parse(i.subjectContent)">
44 45 <p class="option-p">{{item.option}}:{{item.optionContent}}</p>
45 46 </div>
... ... @@ -55,7 +56,7 @@
55 56 <div class="areahead">组卷基本信息</div>
56 57 <el-form ref="form" class="testPaper-manager" :rules="rules" :model="TestPaper" label-width="100px">
57 58 <el-form-item label="试卷名称:" class="el-form-item-custom">
58   - {{TestPaper.TestPaperTitle}}
  59 + <el-input v-model="TestPaper.TestPaperTitle"></el-input>
59 60 </el-form-item>
60 61 <el-form-item label="题目数量:" class="el-form-item-custom">
61 62 {{arr2.length}}
... ... @@ -429,6 +430,7 @@
429 430 SubmitTestPaper() {
430 431  
431 432 this.$refs['form'].validate((valid) => {
  433 +
432 434 if (valid) {
433 435 this.TestPaper.QuestionBankIds = this.arr2.map((u) => u.id);
434 436 var d = this.TestPaper;
... ... @@ -436,6 +438,11 @@
436 438 EditTestPaper(this.TestPaper).then((res) => {
437 439 if (res.data.code == 200) {
438 440 this.$confirm("组卷成功!", "消息");
  441 + this.$router.push({
  442 + path: '/views/TestPaperList',
  443 + query: {
  444 + }
  445 + })
439 446 } else {
440 447 this.$confirm("组卷失败!", "消息");
441 448 }
... ...
src/views/TestPaper/TestPaperList.vue
... ... @@ -21,7 +21,7 @@
21 21 <span>{{ scope.row.TotalScore }}</span>
22 22 </template>
23 23 </el-table-column>
24   -
  24 +
25 25 <el-table-column prop="date" label="单选题数量" width="100">
26 26 <template slot-scope="scope">
27 27 <span>{{ scope.row.SingleNumber }}</span>
... ... @@ -94,7 +94,7 @@
94 94 style="position:static;bottom: 3px;text-align: center;margin-top: 5px;" :page-size="this.parameter.pageSize"
95 95 layout="total,prev, pager, next" :total="Count">
96 96 </el-pagination>
97   - <el-dialog title="添加试卷基本信息" :visible.sync="dialogAddTestPaperVIsible" @close="closeClassDialog" width="600px"
  97 + <el-dialog title="试卷基本信息" :visible.sync="dialogAddTestPaperVIsible" @close="closeClassDialog" width="600px"
98 98 :close-on-click-modal="false">
99 99 <div class="grid-content bg-purple">
100 100 <el-form ref="form" class="testPaper-manager" :model="TestPaper" label-width="100px">
... ... @@ -106,11 +106,11 @@
106 106 :props="{emitPath:false}" :clearable=true :options="QuestionClass">
107 107 </el-cascader>
108 108 </el-form-item>
109   - <el-form-item label="板块分类" class="el-form-item-custom">
  109 + <!-- <el-form-item label="板块分类" class="el-form-item-custom">
110 110 <el-select v-model="TestPaper.PlateClass" placeholder="请选择板块分类">
111 111 <el-option label="面试题" value="4"></el-option>
112 112 </el-select>
113   - </el-form-item>
  113 + </el-form-item> -->
114 114  
115 115  
116 116 <el-form-item label="工种" class="el-form-item-custom">
... ... @@ -176,10 +176,11 @@
176 176 DeleteTestPaper
177 177 } from '@/api/TestPaper'
178 178  
179   - import { GetTypeSetting
  179 + import {
  180 + GetTypeSetting
180 181 } from '@/api/user'
181 182 import { formatTime } from '@/utils/util'
182   - let that={};
  183 + let that = {};
183 184 let list = [];
184 185 export default {
185 186 data() {
... ... @@ -198,7 +199,7 @@
198 199 dialogAddTestPaperVIsible: false,
199 200 dialogQuestionVlsible: false,
200 201 QuestionClass: [],
201   - usertypelist:[],
  202 + usertypelist: [],
202 203 TestPaper: {
203 204 TestPaperTitle: "",
204 205 PlateClass: 4,
... ... @@ -232,13 +233,13 @@
232 233 keyword: ""
233 234 }
234 235 GetToplevel(parameter).then(res => {
235   - console.log('gettoplevel',res);
  236 + console.log('gettoplevel', res);
236 237 list = res.data.data;
237 238 this.$forceUpdate();
238 239 });
239 240  
240   - GetTypeSetting({}).then(res=>{
241   - if(res.data){
  241 + GetTypeSetting({}).then(res => {
  242 + if (res.data) {
242 243 this.usertypelist = res.data || [];
243 244 }
244 245 });
... ... @@ -246,7 +247,7 @@
246 247 filters: {
247 248 typeFilters(val) {
248 249 try {
249   - return list.find(t=>t.id == val).ClassTitle || '未知';
  250 + return list.find(t => t.id == val).ClassTitle || '未知';
250 251 } catch (e) {
251 252 console.log(e);
252 253 return '未知'
... ... @@ -367,10 +368,33 @@
367 368 this.TestPaper = val
368 369 }
369 370 else if (value == 'del') {
370   - DeleteTestPaper(val.id).then(rs => {
371   - this.$message.success('删除成功!');
372   - this.getTestPaperListHeadler();
373   - })
  371 + this.$confirm(
  372 + "确认删除该试卷吗?",
  373 + "提示消息",
  374 + {
  375 + confirmButtonText: "确认",
  376 + cancelButtonText: "取消",
  377 + callback: (action) => {
  378 + if (action == "confirm") {
  379 + DeleteTestPaper(val.id).then(res => {
  380 + // this.$message.success('删除成功!');
  381 + if (res.data.success) {
  382 + this.$message.success("删除成功!");
  383 + this.getTestPaperListHeadler();
  384 + } else {
  385 +
  386 + this.$message.error(res.data.message || "发送失败");
  387 + }
  388 +
  389 +
  390 + this.getTestPaperListHeadler();
  391 + })
  392 + }
  393 + },
  394 + }
  395 + );
  396 +
  397 +
374 398  
375 399 }
376 400  
... ...
src/views/user/userlist.vue
... ... @@ -374,7 +374,8 @@
374 374 <!-- <el-date-picker v-model="user.date" type="datetimerange" range-separator="至" start-placeholder="开始日期"
375 375 end-placeholder="最后日期">
376 376 </el-date-picker> -->
377   - <el-date-picker v-model="user.startTime" type="datetime" placeholder="选择日期时间">
  377 +
  378 + <el-date-picker v-model="user.startTime" type="datetime" placeholder="选择日期时间" :picker-options="pickerOptions">
378 379 </el-date-picker>
379 380 </el-descriptions-item>
380 381 <el-descriptions-item>
... ... @@ -442,9 +443,15 @@
442 443 import { GetHistoryList } from "@/api/HistoryAnswer";
443 444  
444 445 import { getTestPaperList } from "@/api/TestPaper";
  446 + import {formatTime} from '@/utils/util.js'
445 447 export default {
446 448 data() {
447 449 return {
  450 + pickerOptions: {
  451 + disabledDate(time) {
  452 + return time.getTime() < Date.now() - 8.64e7;
  453 + }
  454 + },
448 455 loading: false,
449 456 dialogFormVisible: false,
450 457 dialogTableVisible: false,
... ... @@ -637,17 +644,16 @@
637 644 // if(o.date){
638 645 // start = o.date[0];
639 646 // end = o.date[1];
640   - // }
641   -
  647 + // }
642 648 senddata.push({
643 649 userId: o.id,
644   - startTime: o.startTime,
  650 + startTime: formatTime(o.startTime),
645 651 // endTime: end,
646 652 remark: o.remark || '',
647 653 phone: o.phone,
648 654 msgBody: o.msgBody || ''
649 655 });
650   - });
  656 + });
651 657 AddInvitationCompanyMultiple(senddata).then(res => {
652 658 if (res.data.code == 200) {
653 659 this.$message.success("邀请成功");
... ...
vue.config.js
... ... @@ -38,8 +38,8 @@ 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': ''
... ...