Commit 280549fe authored by 李苏's avatar 李苏 💬

试题管理

parent a40007f4
......@@ -89,6 +89,23 @@ export function doInitXtms(query) {
})
}
/* 新查询细节 */
export function donDtlQuery(query) {
return request({
url: '/aqgl/pxgl/pxsj/query/detail',
method: 'post',
data: query||{}
})
}
/* 新报存 */
export function donDtlSave(query) {
return request({
url: '/aqgl/pxgl/pxsj/save',
method: 'post',
data: query||{}
})
}
......
<template>
<DefaultDialog :app='app'>
<div class="min_full" slot='form' style="height: 80vh;border: 0px;">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='this'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="12" class="search-col">
<div class="search-item">
<span class="search-span">名称:</span>
<el-input v-model="queryParams.info"></el-input>
</div>
</el-col>
</el-row>
</div>
<div class="min_full" slot='form' style="height: 550px;border: 0px;">
<DtlEdit :app='this' v-if="showDialog" ></DtlEdit>
<!-- 按钮操作-->
<el-row class="tool-bar">
<ViewButton ref="view" :app='this'></ViewButton>
<!-- <ViewButton ref="view" :app='this'></ViewButton>
<AddButton ref="add" :app='this'></AddButton>
<CopyButton ref="copy" :app='this'></CopyButton>
<EditButton ref="edit" :app='this'></EditButton>
<EditButton ref="edit" :app='this'></EditButton> -->
<el-button @click="drst" size='mini' style="margin-left: 0px;" type="primary">导入试题</el-button>
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem'
<div class="tablePagers" style="height: 380px;">
<TablePager :showPagination='false' @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem' :delParams="'mxid'"
@getRow='getRow'>
</TablePager>
......@@ -38,13 +29,13 @@
<script>
/* 引入需要的接口*/
import {
doDtlQuery,
doDtlAdd,
doDtlUpdate,
donDtlQuery,
// doDtlAdd,
// doDtlUpdate,
doDtlDelete
} from '@/api/train/examination.js';
/* edit页面*/
import Edit from './dtlEdit.vue'
import DtlEdit from './dtlEdit.vue'
import {
tableMixin_noapp
} from 'common'
......@@ -55,17 +46,32 @@
/* 初始额外赋值*/
async mounted() {
/* 存储试卷数据*/
this.sjdata=this.app.singleItem
this.queryParams.mid=this.app.singleItem.id
this.queryParams.xmid=this.app.singleItem.xmid
this.$nextTick(()=>{
this.$refs['TablePager'].pageQuery()
})
},
data() {
return {
typeObj:{
'M':'多选题',
'S':'单选题',
'J':'判断题',
'F':'填空题'
},
sjdata:{},
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
DialogWidth:'85%',
DialogTitle:'导入试题',
/* 基础url*/
baseUrl: '/aqgl/pxgl/pxsjmx',
/* 查询参数*/
......@@ -75,20 +81,27 @@
/* 表格标题对应参数*/
tableTitle: [
// {label: "试卷ID", prop: "mid", fieldType: "ftString",width:192},
{label: "试题", prop: "stid", fieldType: "ftString",width:192},
{label: "序号", prop: "xh", fieldType: "int"},
{label: "序号", prop: "xh", fieldType: "int",width:60},
{label: "试题", prop: "cont", fieldType: "ftString",width:850},
{label: "类型", prop: "type", formatter:(a,b,c)=>{
let val=this.typeObj[c]
return val
},width:200},
]
}
},
methods: {
drst(){
this.showDialog=true
},
/* 基础查询*/
query: doDtlQuery,
query: donDtlQuery,
/* 基础增*/
apiAdd: doDtlAdd,
/* 基础更新*/
apiUpdate: doDtlUpdate,
/* 删除操作*/
// apiAdd: doDtlAdd,
// /* 基础更新*/
// apiUpdate: doDtlUpdate,
// /* 删除操作*/
apiDelete: doDtlDelete,
/* 初始化赋值操作*/
init() {
......@@ -96,7 +109,7 @@
}
},
components: {
Edit,
DtlEdit,
}
......
This diff is collapsed.
......@@ -65,7 +65,7 @@
return {
/*需要的额外参数 */
showDialog: false,
DialogWidth:'80%',
DialogWidth:'85%',
DialogName: '',
type: '',
DialogTitle:'',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment