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

试题管理

parent a40007f4
...@@ -89,6 +89,23 @@ export function doInitXtms(query) { ...@@ -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> <template>
<DefaultDialog :app='app'> <DefaultDialog :app='app'>
<div class="min_full" slot='form' style="height: 80vh;border: 0px;">
<!-- 查询条件--> <div class="min_full" slot='form' style="height: 550px;border: 0px;">
<div class="search" v-condition> <DtlEdit :app='this' v-if="showDialog" ></DtlEdit>
<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>
<!-- 按钮操作--> <!-- 按钮操作-->
<el-row class="tool-bar"> <el-row class="tool-bar">
<ViewButton ref="view" :app='this'></ViewButton> <!-- <ViewButton ref="view" :app='this'></ViewButton>
<AddButton ref="add" :app='this'></AddButton> <AddButton ref="add" :app='this'></AddButton>
<CopyButton ref="copy" :app='this'></CopyButton> <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> </el-row>
<!-- 表格--> <!-- 表格-->
<div class="tablePagers"> <div class="tablePagers" style="height: 380px;">
<TablePager @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem' <TablePager :showPagination='false' @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem' :delParams="'mxid'"
@getRow='getRow'> @getRow='getRow'>
</TablePager> </TablePager>
...@@ -38,13 +29,13 @@ ...@@ -38,13 +29,13 @@
<script> <script>
/* 引入需要的接口*/ /* 引入需要的接口*/
import { import {
doDtlQuery, donDtlQuery,
doDtlAdd, // doDtlAdd,
doDtlUpdate, // doDtlUpdate,
doDtlDelete doDtlDelete
} from '@/api/train/examination.js'; } from '@/api/train/examination.js';
/* edit页面*/ /* edit页面*/
import Edit from './dtlEdit.vue' import DtlEdit from './dtlEdit.vue'
import { import {
tableMixin_noapp tableMixin_noapp
} from 'common' } from 'common'
...@@ -55,17 +46,32 @@ ...@@ -55,17 +46,32 @@
/* 初始额外赋值*/ /* 初始额外赋值*/
async mounted() { async mounted() {
/* 存储试卷数据*/
this.sjdata=this.app.singleItem
this.queryParams.mid=this.app.singleItem.id this.queryParams.mid=this.app.singleItem.id
this.queryParams.xmid=this.app.singleItem.xmid this.queryParams.xmid=this.app.singleItem.xmid
this.$nextTick(()=>{
this.$refs['TablePager'].pageQuery() this.$refs['TablePager'].pageQuery()
})
}, },
data() { data() {
return { return {
typeObj:{
'M':'多选题',
'S':'单选题',
'J':'判断题',
'F':'填空题'
},
sjdata:{},
/*需要的额外参数 */ /*需要的额外参数 */
showDialog: false, showDialog: false,
DialogName: '', DialogName: '',
type: '', type: '',
DialogTitle: '', DialogWidth:'85%',
DialogTitle:'导入试题',
/* 基础url*/ /* 基础url*/
baseUrl: '/aqgl/pxgl/pxsjmx', baseUrl: '/aqgl/pxgl/pxsjmx',
/* 查询参数*/ /* 查询参数*/
...@@ -75,20 +81,27 @@ ...@@ -75,20 +81,27 @@
/* 表格标题对应参数*/ /* 表格标题对应参数*/
tableTitle: [ tableTitle: [
// {label: "试卷ID", prop: "mid", fieldType: "ftString",width:192}, // {label: "试卷ID", prop: "mid", fieldType: "ftString",width:192},
{label: "试题", prop: "stid", fieldType: "ftString",width:192}, {label: "序号", prop: "xh", fieldType: "int",width:60},
{label: "序号", prop: "xh", fieldType: "int"}, {label: "试题", prop: "cont", fieldType: "ftString",width:850},
{label: "类型", prop: "type", formatter:(a,b,c)=>{
let val=this.typeObj[c]
return val
},width:200},
] ]
} }
}, },
methods: { methods: {
drst(){
this.showDialog=true
},
/* 基础查询*/ /* 基础查询*/
query: doDtlQuery, query: donDtlQuery,
/* 基础增*/ /* 基础增*/
apiAdd: doDtlAdd, // apiAdd: doDtlAdd,
/* 基础更新*/ // /* 基础更新*/
apiUpdate: doDtlUpdate, // apiUpdate: doDtlUpdate,
/* 删除操作*/ // /* 删除操作*/
apiDelete: doDtlDelete, apiDelete: doDtlDelete,
/* 初始化赋值操作*/ /* 初始化赋值操作*/
init() { init() {
...@@ -96,7 +109,7 @@ ...@@ -96,7 +109,7 @@
} }
}, },
components: { components: {
Edit, DtlEdit,
} }
......
This diff is collapsed.
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
return { return {
/*需要的额外参数 */ /*需要的额外参数 */
showDialog: false, showDialog: false,
DialogWidth:'80%', DialogWidth:'85%',
DialogName: '', DialogName: '',
type: '', type: '',
DialogTitle:'', 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