Merge branch 'bjxz-cjw' into bjxz-dev
This commit is contained in:
commit
eb77b91821
@ -85,9 +85,9 @@ if (process.env.NODE_ENV == 'development') {
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
|
||||
// axios.defaults.baseURL ='http://192.168.34.221:19111/' //郭圣雄本地
|
||||
axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
|
||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
|
||||
axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
||||
// axios.defaults.baseURL ='http://183.249.224.118:9000/' //嘉兴王江泾公用码头
|
||||
// axios.defaults.baseURL ='http://101.43.164.214:11111/' // 百色三标段项目
|
||||
|
||||
@ -5,20 +5,20 @@
|
||||
<div class="searchBox whiteBlock">
|
||||
<el-form :inline="true" size="medium" class="demo-form-inline">
|
||||
<el-form-item label="科目" prop="subjectName">
|
||||
<el-select v-model="subjectName" placeholder="请选择">
|
||||
<el-select v-model="subjectName" placeholder="请选择" clearable>
|
||||
<el-option v-for="item in subjectNameList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="试题名称" prop="questionName">
|
||||
<el-input placeholder="请输入" v-model="questionName" suffix-icon="el-icon-search"></el-input>
|
||||
<el-input placeholder="请输入" v-model="questionName" suffix-icon="el-icon-search" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="expintBtn" size="medium" type="primary" @click="addExam()">
|
||||
新增考试
|
||||
</el-button>
|
||||
<el-button class="expintBtn" suffix-icon="el-icon-search" size="medium" type="primary" @click="getRecordList()">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button class="expintBtn" size="medium" type="primary" @click="addExam()">
|
||||
新增考试
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -60,33 +60,39 @@
|
||||
<el-dialog :modal-append-to-body="false" :title="title" :visible.sync="dialogVisible" width="660px">
|
||||
<div class="dialogContainer">
|
||||
<!-- <div class="dialogLeft"> -->
|
||||
<el-form :model="examForm" ref="examForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="考试科目" prop="subjectType">
|
||||
<el-form :model="examForm" ref="examForm" :rules="examRules" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="考试科目" prop="subjectType" required>
|
||||
<el-select v-model="examForm.subjectType" placeholder="请选择">
|
||||
<el-option :label="item.name" :value="item.id" v-for="(item,i) in examSubjectList" :key="i"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="试卷名称" prop="subjectName">
|
||||
<el-form-item label="试卷名称" prop="subjectName" required>
|
||||
<el-input v-model="examForm.subjectName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="考试时间" prop="examTime">
|
||||
<el-input style="width: 190px" v-model="examForm.examTime"></el-input>
|
||||
<el-form-item label="考试时间" prop="examTime" required>
|
||||
<el-input-number :min="0" :controls="false" :precision="0" style="width: 190px" v-model="examForm.examTime"></el-input-number>
|
||||
<span style="margin-left: 10px;color:#a6a7b2;">分钟</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="及格分数线" prop="examPass">
|
||||
<el-input style="width: 190px" v-model="examForm.passScore"></el-input>
|
||||
<el-form-item label="及格分数线" prop="examPass" required>
|
||||
<el-input-number :min="0" :max="100" :controls="false" :precision="0" style="width: 190px" v-model="examForm.passScore"></el-input-number>
|
||||
<span style="margin-left: 10px;color:#a6a7b2;">分</span>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="学习周期" prop="studyCycle">
|
||||
<el-date-picker v-model="examForm.studyCycle" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="备注" prop="desc">
|
||||
<el-input type="textarea" maxlength="500" rows="3" :show-word-limit="true" v-model="examForm.desc"></el-input>
|
||||
<el-input type="textarea" rows="3" :show-word-limit="true" v-model="examForm.desc"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="抽题模式" prop="examMode">
|
||||
<el-form-item label="抽题模式" prop="examMode" required>
|
||||
<el-radio-group v-model="examForm.examMode" @input="handleDialog">
|
||||
<el-radio label="1">手动抽题</el-radio>
|
||||
<el-radio label="2">随机抽题</el-radio>
|
||||
<div style="display:flex">
|
||||
<div @click="dialogVisible2 = true">
|
||||
<el-radio label="1">手动抽题</el-radio>
|
||||
</div>
|
||||
<div style="margin-left:10px" @click="dialogVisible3 = true">
|
||||
<el-radio label="2">随机抽题</el-radio>
|
||||
</div>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- @click="submitForm('examForm')" -->
|
||||
@ -151,7 +157,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter">
|
||||
<el-button @click="dialogVisible2 = false"><i class="el-icon-circle-close"></i> 取 消</el-button>
|
||||
<el-button @click="cancel2()"><i class="el-icon-circle-close"></i> 取 消</el-button>
|
||||
<el-button type="primary" @click="submitBtn2('1')"><i class="el-icon-circle-check"></i> 确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -207,7 +213,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="dialogFooter" style="margin-top:30px">
|
||||
<el-button @click="dialogVisible3 = false"><i class="el-icon-circle-close"></i> 取 消</el-button>
|
||||
<el-button @click="cancel3()"><i class="el-icon-circle-close"></i> 取 消</el-button>
|
||||
<el-button type="primary" @click="submitBtn3('0')"><i class="el-icon-circle-check"></i> 确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -223,7 +229,7 @@
|
||||
<p style="margin-bottom: 10px; margin-left:20px;width:50%">试题名称:{{examDetailInfo.name}}</p>
|
||||
<p style="margin-bottom: 10px; margin-left:20px;width:50%">考试时长:{{examDetailInfo.duration}}</p>
|
||||
<p style="margin-bottom: 10px; margin-left:20px;width:50%">及格分数:{{examDetailInfo.passLine}}</p>
|
||||
<p style="margin-bottom: 10px; margin-left:20px;width:50%">考试备注:{{examDetailInfo.remark}}</p>
|
||||
<p style="margin-bottom: 10px; margin-left:20px;width:200%">考试备注:{{examDetailInfo.remark}}</p>
|
||||
<!-- <p style="margin-bottom: 10px; margin-left:20px"><span style="color: #ea3941">* </span>考试周期:{{examDetailInfo.beginTime}}至{{examDetailInfo.endTime}}</p> -->
|
||||
</div>
|
||||
</div>
|
||||
@ -244,7 +250,7 @@
|
||||
<template slot-scope="scope">
|
||||
<div style="margin-left:10px">
|
||||
<div v-for="(item,i) in scope.row.optionList" :key="i">
|
||||
<p style="padding-right:0px;">{{item.optionCode}}、{{item.optionDesc}}昂克赛拉扩大飞机螺丝钉咖啡碱;</p>
|
||||
<p style="padding-right:0px;">{{item.optionCode}}、{{item.optionDesc}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -396,7 +402,7 @@ export default {
|
||||
subjectName:"",
|
||||
},
|
||||
emActiveTab: 'examRecord',
|
||||
examManageInfo:{examTotalScore:'100',passScore: '60',questionCount: '100', examPeriod: '2024-05-12 00:00:00-2024-06-01 00:00:00', joinCount: '100',noJoinCount: '2'},
|
||||
examManageInfo:{examTotalScore:'100',passScore: 60,questionCount: '100', examPeriod: '2024-05-12 00:00:00-2024-06-01 00:00:00', joinCount: '100',noJoinCount: '2'},
|
||||
isExamManage: false, // 考试管理开关
|
||||
examInfoList: [
|
||||
{examineeName: '123',idCard: '123456789123456789',questionName:'123123123123123123123123',questionType:'单选题',answer:'123123123123123123123123123123123'},
|
||||
@ -473,7 +479,6 @@ export default {
|
||||
dialogVisible3: false, //新增三级弹窗
|
||||
dialogVisible4: false, //考试详情弹窗
|
||||
workerInfo: {
|
||||
subdivisionProjectName: '',
|
||||
children: [],
|
||||
id: '',
|
||||
level: 0,
|
||||
@ -484,6 +489,43 @@ export default {
|
||||
{ ruleType: '1', symbol: '+', ruleScore: 3 },
|
||||
{ ruleType: '', symbol: '', ruleScore: '' },
|
||||
],
|
||||
examRules:{
|
||||
subjectType: [
|
||||
{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
subjectName: [
|
||||
{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
examTime: [
|
||||
{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
passScore: [
|
||||
{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
examMode: [
|
||||
{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
addEditRules: {
|
||||
subdivisionProjectName: [
|
||||
{
|
||||
@ -600,6 +642,14 @@ export default {
|
||||
// this.loadData() // 查询班组及部门
|
||||
},
|
||||
methods: {
|
||||
cancel2(){
|
||||
this.examForm.examMode = null
|
||||
this.dialogVisible2 = false
|
||||
},
|
||||
cancel3(){
|
||||
this.examForm.examMode = null
|
||||
this.dialogVisible3 = false
|
||||
},
|
||||
singleChange(){
|
||||
// 清空选中的值
|
||||
this.randomQuestion.examSingle.count = null
|
||||
@ -608,7 +658,6 @@ export default {
|
||||
this.randomQuestion.examMultiple.count = null
|
||||
},
|
||||
getRandomQuestion(){
|
||||
console.log(this.randomQuestion,"random======================")
|
||||
this.randomQueryList = []
|
||||
let singleRandom = {
|
||||
type:1,
|
||||
@ -642,8 +691,9 @@ export default {
|
||||
// alert('还未对接口')
|
||||
delPaperApi({ id: obj.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.getRecordList()
|
||||
// this.getRecordList()
|
||||
this.$message.success('删除成功')
|
||||
this.refreshFn()
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
@ -864,7 +914,7 @@ export default {
|
||||
}
|
||||
}),
|
||||
radio:this.examForm.examMode == 1 ? this.examAddDetail.questions.filter(item => item.type == 1).length : this.randomQuestion.examSingle.count,
|
||||
multi:this.examForm.examMode == 1 ? this.examAddDetail.questions.filter(item => item.type == 1).length : this.randomQuestion.examMultiple.count,
|
||||
multi:this.examForm.examMode == 1 ? this.examAddDetail.questions.filter(item => item.type == 2).length : this.randomQuestion.examMultiple.count,
|
||||
}
|
||||
|
||||
if (this.title == '新增考试') {
|
||||
@ -935,10 +985,12 @@ export default {
|
||||
//切换条数
|
||||
sizeChange(val) {
|
||||
this.pagInfo.pageSize = val
|
||||
this.getRecordList()
|
||||
},
|
||||
//切换页数
|
||||
currentChange(val) {
|
||||
this.pagInfo.pageNo = val
|
||||
this.getRecordList()
|
||||
},
|
||||
//切换条数
|
||||
examSizeChange(val) {
|
||||
@ -968,7 +1020,10 @@ export default {
|
||||
this.getRandomQuestion()
|
||||
this.dialogVisible3 = false;
|
||||
},
|
||||
|
||||
refreshFn(){
|
||||
this.pagInfo.pageNo = 1
|
||||
this.getRecordList()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@ -1110,6 +1165,10 @@ export default {
|
||||
.dialogLeft{
|
||||
width:100%;
|
||||
height:100%;
|
||||
/deep/ .el-textarea .el-input__count{
|
||||
margin: -50px -10px -40px -50px;
|
||||
background-color: rgb(1, 1, 1, 0);
|
||||
}
|
||||
// background-color: darkred;
|
||||
/deep/ .el-upload-dragger {
|
||||
width: 230px;
|
||||
|
||||
@ -115,10 +115,10 @@ export default {
|
||||
pageNo: this.pagInfo.pageNo,
|
||||
pageSize: this.pagInfo.pageSize,
|
||||
projectSn: this.$store.state.projectSn,
|
||||
}).then((result) => {
|
||||
if (result.success) {
|
||||
this.tableData = result.result.records
|
||||
this.pagInfo.total = result.result.total
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.tableData = res.result.records
|
||||
this.pagInfo.total = res.result.total
|
||||
}
|
||||
})
|
||||
// this.tableData = [
|
||||
@ -156,17 +156,17 @@ export default {
|
||||
if (valid) {
|
||||
if (this.title == '新增') {
|
||||
console.log('addEditForm新增', params)
|
||||
addExamRegulationApi(params).then((result) => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message)
|
||||
addExamRegulationApi(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
} else if (this.title == '编辑') {
|
||||
console.log('addEditForm编辑', params)
|
||||
editExamRegulationApi(params).then((result) => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message)
|
||||
editExamRegulationApi(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
@ -184,9 +184,9 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
obj.isEnable = status
|
||||
editExamRegulationApi(obj).then((result) => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message)
|
||||
editExamRegulationApi(obj).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
@ -207,8 +207,9 @@ export default {
|
||||
// alert('还未对接口')
|
||||
deleteExamRegulationApi({ id: obj.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.getList()
|
||||
this.$message.success(result.message)
|
||||
// this.getList()
|
||||
this.refresh()
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
|
||||
@ -234,7 +234,8 @@ export default {
|
||||
// alert('还未对接口')
|
||||
deleteCourseApi({ id: obj.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.getPageCourseApi()
|
||||
// this.getPageCourseApi()
|
||||
this.refreshBtn()
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message({
|
||||
@ -403,17 +404,18 @@ export default {
|
||||
this.getPageCourseApi()
|
||||
},
|
||||
sizeChangeDetail(val) { // pageSize的处理
|
||||
this.pagInfoDetail.pageSize = val
|
||||
this.pagInfo.pageSize = val
|
||||
this.getPageCourseRecord()
|
||||
},
|
||||
currentChangeDetail(val) { // 当前页pageNo的处理
|
||||
this.pagInfoDetail.pageNo = val
|
||||
this.pagInfo.pageNo = val
|
||||
this.getPageCourseRecord()
|
||||
},
|
||||
//刷新按钮
|
||||
refreshBtn() {
|
||||
this.pagInfoDetail.pageNo = 1;
|
||||
this.getPageCourseRecord()
|
||||
this.pagInfo.pageNo = 1;
|
||||
this.pagInfo.pageSize = 10;
|
||||
this.getPageCourseApi()
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -111,12 +111,12 @@
|
||||
style="width: 100%; color: #737996"
|
||||
@selection-change="handleCheckedCitiesChange"
|
||||
>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
type="selection"
|
||||
width="70"
|
||||
align="center"
|
||||
label="序号"
|
||||
></el-table-column>
|
||||
></el-table-column> -->
|
||||
<el-table-column prop="questionName" label="试题内容"></el-table-column>
|
||||
<el-table-column prop="type" width="100px" label="题目类型">
|
||||
<template slot-scope="scope">
|
||||
@ -273,7 +273,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="试题分数" prop="score" required>
|
||||
<el-form-item label="试题分数" prop="score">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
:precision="0"
|
||||
@ -386,7 +386,7 @@
|
||||
size="medium"
|
||||
type="primary"
|
||||
plain
|
||||
@click="addQuestionAnswer(index)"
|
||||
@click="addQuestionAnswer()"
|
||||
>新增选项</el-button
|
||||
>
|
||||
</div>
|
||||
@ -540,6 +540,21 @@ export default {
|
||||
{ name: "多选题", value: 2 },
|
||||
],
|
||||
questionFormRules: {
|
||||
|
||||
content: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
subjectId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
type: [
|
||||
{
|
||||
required: true,
|
||||
@ -561,6 +576,13 @@ export default {
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
score: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
questionForm: {
|
||||
content: "",
|
||||
@ -578,63 +600,7 @@ export default {
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
activeNav: 1,
|
||||
level1CompanyData: [
|
||||
{
|
||||
label: "一级 1",
|
||||
children: [
|
||||
{
|
||||
label: "二级 1-1",
|
||||
children: [
|
||||
{
|
||||
label: "三级 1-1-1",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "一级 2",
|
||||
children: [
|
||||
{
|
||||
label: "二级 2-1",
|
||||
children: [
|
||||
{
|
||||
label: "三级 2-1-1",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "二级 2-2",
|
||||
children: [
|
||||
{
|
||||
label: "三级 2-2-1",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "一级 3",
|
||||
children: [
|
||||
{
|
||||
label: "二级 3-1",
|
||||
children: [
|
||||
{
|
||||
label: "三级 3-1-1",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "二级 3-2",
|
||||
children: [
|
||||
{
|
||||
label: "三级 3-2-1",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
level1CompanyData: [],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "name",
|
||||
@ -785,6 +751,9 @@ export default {
|
||||
findIndex != -1 ||
|
||||
!someFlag
|
||||
) {
|
||||
console.log(this.questionArr.length == 0,'length')
|
||||
console.log(findIndex != -1,'index')
|
||||
console.log(someFlag,'isflag')
|
||||
this.$message.error("请添加试题并完整填写以及选中答案");
|
||||
return;
|
||||
}
|
||||
@ -954,6 +923,7 @@ export default {
|
||||
},
|
||||
// 添加试题按钮
|
||||
addQuestionBtn() {
|
||||
this.questionForm = {}
|
||||
this.title = "添加试题";
|
||||
this.questionForm.content = "";
|
||||
this.questionArr = [{ isCheck: true, questionContent: "" },{ isCheck: true, questionContent: "" },{ isCheck: true, questionContent: "" },{ isCheck: true, questionContent: "" }];
|
||||
@ -963,10 +933,14 @@ export default {
|
||||
},
|
||||
// 添加答案项
|
||||
addQuestionAnswer() {
|
||||
this.questionArr.push({ isCheck: false, questionContent: "" });
|
||||
this.questionArr.push({ isCheck: true , questionContent: "" });
|
||||
},
|
||||
// 删除答案项
|
||||
deleteQuestionAnswer(index) {
|
||||
if(this.questionArr.length === 4 || this.checkList.length === 4){
|
||||
this.$message.warning('至少四个选项!')
|
||||
return
|
||||
}
|
||||
this.questionArr.splice(index, 1);
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
@ -1075,7 +1049,8 @@ export default {
|
||||
}).then(result => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message);
|
||||
this.getList();
|
||||
// this.getList();
|
||||
this.inquireBtn()
|
||||
}else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
@ -1292,4 +1267,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
/deep/ el-tree__empty-text{
|
||||
margin-top: 30%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -115,10 +115,10 @@ export default {
|
||||
pageNo: this.pagInfo.pageNo,
|
||||
pageSize: this.pagInfo.pageSize,
|
||||
projectSn: this.$store.state.projectSn,
|
||||
}).then((result) => {
|
||||
if (result.success) {
|
||||
this.tableData = result.result.records
|
||||
this.pagInfo.total = result.result.total
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.tableData = res.result.records
|
||||
this.pagInfo.total = res.result.total
|
||||
}
|
||||
})
|
||||
// this.tableData = [
|
||||
@ -156,17 +156,17 @@ export default {
|
||||
if (valid) {
|
||||
if (this.title == '新增') {
|
||||
console.log('addEditForm新增', params)
|
||||
addSafetyManualApi(params).then((result) => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message)
|
||||
addSafetyManualApi(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
} else if (this.title == '编辑') {
|
||||
console.log('addEditForm编辑', params)
|
||||
editSafetyManualApi(params).then((result) => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message)
|
||||
editSafetyManualApi(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
@ -184,9 +184,9 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
obj.isEnable = status
|
||||
editSafetyManualApi(obj).then((result) => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message)
|
||||
editSafetyManualApi(obj).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
@ -207,8 +207,9 @@ export default {
|
||||
// alert('还未对接口')
|
||||
deleteSafetyManualApi({ id: obj.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.getList()
|
||||
this.$message.success(result.message)
|
||||
this.$message.success(res.message)
|
||||
// this.getList()
|
||||
this.refresh()
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
|
||||
@ -237,7 +237,7 @@ export default {
|
||||
type: 'success',
|
||||
message: this.$t('message.quality.successfullyDelete') + '!',
|
||||
})
|
||||
this.getExamSubjectList()
|
||||
this.refresh()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@ -536,7 +536,8 @@ export default {
|
||||
// alert('还未对接口')
|
||||
deleteTrainApi({ id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
this.getRecordList()
|
||||
// this.getRecordList()
|
||||
this.refresh()
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message({
|
||||
@ -685,10 +686,12 @@ export default {
|
||||
//切换条数
|
||||
sizeChange(val) {
|
||||
this.pagInfo.pageSize = val
|
||||
this.getRecordList()
|
||||
},
|
||||
//切换页数
|
||||
currentChange(val) {
|
||||
this.pagInfo.pageNo = val
|
||||
this.getRecordList()
|
||||
},
|
||||
//切换条数
|
||||
workerSizeChange(val) {
|
||||
@ -703,6 +706,10 @@ export default {
|
||||
handleChange(value, direction, movedKeys) {
|
||||
console.log(value, direction, movedKeys);
|
||||
},
|
||||
refresh(){
|
||||
this.pagInfo.pageNo = 1
|
||||
this.getRecordList()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user