'考试管理人员管理'
This commit is contained in:
@ -18,8 +18,12 @@
|
||||
import { qcckPost , qcckGet} from "@/api/qcckApi.js";
|
||||
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
||||
import { ref, reactive,defineEmits,getCurrentInstance } from 'vue';
|
||||
|
||||
const emit = defineEmits(["refresh"]);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BAXX_KTLX } = proxy.dict("D_BAXX_KTLX");
|
||||
|
||||
const dialogForm = ref(false);
|
||||
const title = ref('');
|
||||
const FormRef = ref();
|
||||
@ -41,7 +45,7 @@ const rules = reactive({
|
||||
|
||||
const formList = reactive([
|
||||
[
|
||||
{ label: "题型", prop: "type", type: "select", options: [{label:'单选题',value:'1'},{label:'多选题',value:'2'},{label:'判断题',value:'3'}] },
|
||||
{ label: "题型", prop: "type", type: "select", options: D_BAXX_KTLX },
|
||||
{ label: "题目", prop: "tm", type: "input" },
|
||||
],
|
||||
[
|
||||
@ -60,11 +64,11 @@ const formList = reactive([
|
||||
|
||||
|
||||
// 初始化数据
|
||||
const init = (type, id,) => {
|
||||
const init = (type, row = {}) => {
|
||||
dialogForm.value = true;
|
||||
openType.value = type;
|
||||
title.value = type == "add" ? "新增" : "编辑";
|
||||
if(id) getDateById(id)
|
||||
listQuery.value = { ...row }
|
||||
};
|
||||
|
||||
const save = () => {
|
||||
|
||||
@ -24,8 +24,8 @@
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link type="primary" link @click="addEdit('edit', row.id)">编辑</el-link>
|
||||
<el-link type="primary" link @click="addEdit('detail', row.id)">详情</el-link>
|
||||
<el-link type="primary" link @click="addEdit('edit', row)">编辑</el-link>
|
||||
<el-link type="primary" link @click="addEdit('detail', row)">详情</el-link>
|
||||
<el-link type="danger" link @click="handleDelete(row.id)">删除</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
@ -114,7 +114,7 @@ const changeSize = (val) => {
|
||||
const getList = () => {
|
||||
pageData.tableConfiger.loading = true;
|
||||
let data = { ...pageData.pageConfiger, ...queryFrom.value };
|
||||
qcckGet(data, "/mosty-base/baxx/tkgl/page").then((res) => {
|
||||
qcckPost(data, "/mosty-base/baxx/tkgl/page").then((res) => {
|
||||
pageData.tableData = res.records || [];
|
||||
pageData.total = res.total;
|
||||
pageData.tableConfiger.loading = false;
|
||||
@ -135,9 +135,9 @@ const handleDelete = (ids) => {
|
||||
};
|
||||
|
||||
// 详情
|
||||
const addEdit = (type, id) => {
|
||||
const addEdit = (type, row) => {
|
||||
nextTick(() => {
|
||||
detailDiloag.value.init(type, id);
|
||||
detailDiloag.value.init(type, row);
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user