代码拉取完成,页面将自动刷新
同步操作将从 cpb/飞机动态监视 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>广电答题后台管理系统</title>
<link href="css/index.css" rel="stylesheet" type="text/css">
<link href="css/common.css" rel="stylesheet" type="text/css">
<style>
/*日期范围选择器*/
.el-date-editor--daterange.el-input, .el-date-editor--daterange.el-input__inner, .el-date-editor--timerange.el-input, .el-date-editor--timerange.el-input__inner{}
</style>
</head>
<body >
<div id="load"><loading v-show="showLoading"></loading></div>
<div id="app" v-cloak >
<div class="wraper">
<header class="header">
<div class="left">logo</div>
<div class="cut"></div>
<div class="right">用户管理</div>
</header>
<div class="main">
<!-- 左边菜单栏 -->
<aside class="navMenu">
<my_menu></my_menu>
</aside>
<section class="content_container">
<!-- <h2 class="aera_tit"></h2> -->
<div class="form_box">
<el-form :inline="true" :model="ruleForm" class="demo-form-inline" label-width="80px" size="small">
<el-form-item label="题型" >
<el-select v-model="ruleForm.question_type" placeholder="请选择">
<el-option label="单选" value="1"></el-option>
<el-option label="多选" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item class="ml30">
<el-button type="primary" @click="search">查 询</el-button>
<el-button type="primary" @click="">新增</el-button>
<el-button type="primary" @click="">批量导入</el-button>
<el-button type="primary" @click="">批量删除</el-button>
</el-form-item>
</el-form>
</div>
<div class="content_table">
<!-- 表格 -->
<el-table class="myTable" ref="table" :data="tableData.orders" border stripe tooltip-effect="dark" >
<el-table-column type="selection" width="40"></el-table-column>
<el-table-column prop="ques" label="问题" ></el-table-column>
<el-table-column prop="answer" label="答案" width="100"></el-table-column>
<el-table-column prop="score" label="积分" width="100"></el-table-column>
<el-table-column prop="type" label="题型" width="100">
<template slot-scope="scope">
<el-tag type="success" size="mini">{{scope.row.type | ques_type_str}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="click" label="操作" width="180">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="sendScore(scope.row.id)">修改</el-button>
<el-button type="primary" size="mini" @click="Delete(scope.row.id)" >删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<div class="pagination">
<el-pagination
style="text-align: right;"
background
layout="total,sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:total="tableData.total"
:page-sizes="[10, 20, 50, 100]"
:page-size="sizeCount">
</el-pagination>
</div>
</div>
</section>
</div>
</div>
<!-- 问题编辑弹窗 -->
<el-dialog title="编辑" :visible.sync="dialog_ques" :modal-append-to-body="false" :lock-scroll="true" append-to-body width="40%" @close="dialog_ques_close">
<el-form :model="ques_form" ref="ref_form" :rules="rules" label-width="80px" class="dialogForm">
<!-- <el-form-item label="GMI状态">
<el-select v-model="ques_form.GMI_status" placeholder="请选择" @change="gmi_selectChange">
<el-option label="成功" value="2"></el-option>
<el-option label="失败" value="3"></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="题型" prop="type">
<el-radio-group v-model="ques_form.type">
<el-radio :label="1">单线</el-radio>
<el-radio :label="2">多选</el-radio>
<el-radio :label="3">判断</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="积分" prop="score" >
<el-input-number v-model="ques_form.score" :step="50"></el-input-number>
</el-form-item>
<el-form-item label="问题内容" prop="ques_txt" >
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入内容" v-model="ques_form.ques_txt"></el-input>
</el-form-item>
<el-form-item label="答案选项" >
<template v-for="item in ques_form.answer_list">
<el-form-item label-width="30px" :label="item.tit" style="margin-bottom: 10px;">
<el-col :span="18">
<el-input placeholder="请输入内容" v-model="item.txt"></el-input>
</el-col>
<el-col :span="1"></el-col>
<el-col :span="5" style="margin-left: 5px;">
<el-checkbox v-model="item.flag">正确答案</el-checkbox>
</el-col>
</el-form-item>
</template>
<el-form-item>
<el-button @click="addAnswerOption" size="small">新增</el-button>
<el-button @click="delAnswerOption" size="small">删除</el-button>
</el-form-item>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialog_ques=false" size="small">取 消</el-button>
<el-button type="primary" @click="changeGMI_status('ref_form')" size="small">确 定</el-button>
</div>
</el-dialog>
</section>
</div>
<script src="plugins/vue2.5.9.js"></script>
<script src="plugins/axios.min.js"></script>
<script src="plugins/ele2.3.3.js"></script>
<script src="plugins/httpVueLoader.js"></script>
<script src="js/common.js"></script>
<script src="js/fetch.js"></script>
<script>
var vm = new Vue({
el: '#app',
components: {
'my_menu': 'url:component/my_menu.vue',
'my_menu2': 'url:component/my_menu2.vue'
},
// mixins: [mixin_common],
data: {
dialog_ques:true,
currentPage:1,
sizeCount:20, // 每页显示的条数
tableData:{
orders:[
{ques:"党员领导干部还必须参加党委、党组的民主生活会,不允许有任何不参加党的组织生活、不接受( )的特殊党员",answer:"A,B",score:10,type:2,id:"1"},
{ques:"党员领导干部还必须参加党委、党组的民主生活会,不允许有任何不参加党的组织生活、不接受( )的特殊党员",answer:"A,B",score:10,type:2,id:"1"},
{ques:"党员领导干部还必须参加党委、党组的民主生活会,不允许有任何不参加党的组织生活、不接受( )的特殊党员",answer:"A,B",score:10,type:2,id:"1"},
{ques:"党员领导干部还必须参加党委、党组的民主生活会,不允许有任何不参加党的组织生活、不接受( )的特殊党员",answer:"A,B",score:10,type:2,id:"1"},
{ques:"党员领导干部还必须参加党委、党组的民主生活会,不允许有任何不参加党的组织生活、不接受( )的特殊党员",answer:"A,B",score:10,type:2,id:"1"},
{ques:"党员领导干部还必须参加党委、党组的民主生活会,不允许有任何不参加党的组织生活、不接受( )的特殊党员",answer:"A,B",score:10,type:2,id:"1"},
{ques:"党员领导干部还必须参加党委、党组的民主生活会,不允许有任何不参加党的组织生活、不接受( )的特殊党员",answer:"A,B",score:10,type:2,id:"1"},
{ques:"党员领导干部还必须参加党委、党组的民主生活会,不允许有任何不参加党的组织生活、不接受( )的特殊党员",answer:"A,B",score:10,type:2,id:"1"},
{ques:"党员领导干部还必须参加党委、党组的民主生活会,不允许有任何不参加党的组织生活、不接受( )的特殊党员",answer:"A,B",score:10,type:2,id:"1"},
{ques:"党员领导干部还必须参加党委、党组的民主生活会,不允许有任何不参加党的组织生活、不接受( )的特殊党员",answer:"A,B",score:10,type:2,id:"1"},
{ques:"党员领导干部还必须参加党委、党组的民主生活会,不允许有任何不参加党的组织生活、不接受( )的特殊党员",answer:"A,B",score:10,type:2,id:"1"},
],
total:100
}, // 表格数据,包括分页数,未支付订单数
ruleForm:{
question_type:"",
},
ques_form:{
type:"",
score:"",
ques_txt:"",
answer_list:[
{tit:"A",txt:"",flag:true},
{tit:"B",txt:"",flag:false},
{tit:"C",txt:"",flag:false},
{tit:"D",txt:"",flag:false}
]
},
rules:{}
},
created:function () {
var _this = this;
},
/*watch:{
'ruleForm.entityName':function (val, oldVal) {
this.$nextTick(function () {
this.ruleForm.entityName = this.ruleForm.entityName.replace(/[^\x00-\xff]/g,'');
})
},
},*/
mounted: function () {
// this.getTableData();
},
filters:{
ques_type_str:function (val) {
if (val==1) {
return "单选"
} else if (val==2) {
return "多选"
}
}
},
methods: {
/*menu_select:function (index,indexPath) {
console.log(index);
var cur_arr = this.list.filter(function (item) {
return item.index == index;
})
// window.location.href=cur_arr[0].url
},*/
Delete:function (id) {
console.log(id);
this.$confirm('确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
/*var url = "OfflinePayments/"
post("OfflinePayments/",{id:id}).then(function (res) {
vm.dialog_pay = false;
if (res.status==200) {
vm.$message({
message: '操作成功',
type: 'success',
duration:1000,
});
// 刷新表格数据
vm.getTableData();
}
})*/
})
},
// 送积分
sendScore:function (id) {
var _this = this;
this.dialog_ques=true;
},
changeDate:function () {
},
dialog_ques_close:function () {
},
// 查询
search:function () {
/*if (this.currentPage==1) {
this.getTableData();
} else {
this.currentPage==1
}*/
},
//点击分页
handleCurrentChange:function(val) {
/*this.currentPage = val;
this.getTableData();*/
},
//点击选择每页显示多少条
handleSizeChange:function(val) {
/*this.sizeCount = val;
this.getTableData();*/
},
// 获取表格数据公共方法
getTableData:function () {
/*var _this = this;
// 点击清空日期按钮时,变量会变为null
if (this.ruleForm.applyDaterange==null){
this.ruleForm.applyDaterange =[]
}
if (this.ruleForm.completeDaterange==null){
this.ruleForm.completeDaterange =[]
}
var params={
Email:this.ruleForm.email,
LegalEntityName:this.ruleForm.entityName,
AccountNumber:this.ruleForm.account,
ApplyStartDate:this.ruleForm.applyDaterange.length>0?this.ruleForm.applyDaterange[0]:'',
ApplyEndDate:this.ruleForm.applyDaterange.length>0?this.ruleForm.applyDaterange[1]:'',
CompleteStartDate:this.ruleForm.completeDaterange.length>0?this.ruleForm.completeDaterange[0]:'',
CompleteEndDate:this.ruleForm.completeDaterange.length>0?this.ruleForm.completeDaterange[1]:'',
PaymentStatus:this.ruleForm.payStatus,
PushGMIStatus:this.ruleForm.PushGMIStatus,
InProcess:false, // 为true,进行中的订单
ProcessStatus:this.ruleForm.ProcessStatus,
PageIndex:this.currentPage,
PageSize:this.sizeCount,
}
if(this.currentTab==2){
params.InProcess=true
} else if(this.currentTab==1||this.currentTab==3){
params.InProcess=false;
}
get("Orders",params).then(function (res) {
if (res.status==200) {
_this.tableData = res.data;
setTimeout(function () {
_this.checked();
}, 100)
}
})*/
},
addAnswerOption:function () {
var list = this.ques_form.answer_list;
var answerOption_tit
if (list.length==4) {
answerOption_tit = "E"
} else if (list.length==5) {
answerOption_tit = "F"
}
if (list.length>=6) {
this.$message({
message: '最多只能添加6条',
type: 'error',
duration:1500
});
} else {
this.ques_form.answer_list.push({
tit: answerOption_tit,
txt:"",
flag:false
});
}
},
delAnswerOption:function () {
var list = this.ques_form.answer_list;
if (list.length>4) {
this.ques_form.answer_list.splice(-1,1)
} else{
this.$message({
message: '至少保留4个选项',
type: 'error',
duration:1500
});
}
},
}
});
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。