mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 05:46:45 +08:00
添案例接口添多数据情况批量标记弹窗封装新增查答卷查投票抽屉考勤面管添在线注释及清空考和测管内容判断
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">试卷名称:</div>
|
||||
<a-input
|
||||
v-model:value="name"
|
||||
v-model:value="inputPname"
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入试卷名称或序号"
|
||||
/>
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">创建人:</div>
|
||||
<a-input
|
||||
v-model:value="name"
|
||||
v-model:value="inputCname"
|
||||
style="width: 240px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入创建人"
|
||||
/>
|
||||
@@ -59,11 +59,10 @@
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tabledata"
|
||||
:data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
:row-selection="{selectedRowKeys:selectedRowKeys,onSelect:onSelect,onChange:onSelectChange}"
|
||||
:scroll="{ x: 900 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
/>
|
||||
<div class="tableBox">
|
||||
@@ -84,15 +83,16 @@
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn2" @click="CreatSTText()">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive, onMounted } from "vue";
|
||||
import * as api from "../../api/index";
|
||||
import { toRefs, reactive } from "vue";
|
||||
import * as api from "../../api/indexTest";
|
||||
import { message } from 'ant-design-vue';
|
||||
export default {
|
||||
name: "STest",
|
||||
props: {
|
||||
@@ -104,62 +104,72 @@
|
||||
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
name: "",
|
||||
inputPname: "",
|
||||
inputCname: "",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 0,
|
||||
projectName: "",
|
||||
tabledata: [],
|
||||
tableData: [],
|
||||
selectedRowKeys:[],
|
||||
//需要传给父亲的参数
|
||||
SelectTestData:{},
|
||||
|
||||
});
|
||||
//点击确认后执行此方法将参数传给父亲
|
||||
const CreatSTText = ()=> {
|
||||
ctx.emit('getSTData',state.SelectTestData)
|
||||
closeDrawer()
|
||||
}
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:STvisible", false);
|
||||
};
|
||||
|
||||
const afterVisibleChange = () => {
|
||||
getManageList()
|
||||
};
|
||||
|
||||
const tableDataFunc = ()=> {
|
||||
{
|
||||
const columns = [
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "workNum",
|
||||
key: "workNum",
|
||||
width: 50,
|
||||
title: "序号",
|
||||
dataIndex: "paperId",
|
||||
key: "paperId",
|
||||
width: 90,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
},
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "userName",
|
||||
key: "userName",
|
||||
width: 50,
|
||||
title: "试卷名称",
|
||||
dataIndex: "testName",
|
||||
key: "testName",
|
||||
width: 110,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
},
|
||||
{
|
||||
title: "所在部门",
|
||||
dataIndex: "deptName",
|
||||
key: "userName",
|
||||
width: 60,
|
||||
title: "随机模式",
|
||||
dataIndex: "paperMode",
|
||||
key: "paperMode",
|
||||
width: 110,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "所在岗位",
|
||||
dataIndex: "jobName",
|
||||
key: "jobName",
|
||||
width: 60,
|
||||
title: "创建人",
|
||||
dataIndex: "sysCreateBy",
|
||||
key: "sysCreateBy",
|
||||
width: 90,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
width: 100,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "任务状态",
|
||||
dataIndex: "status",
|
||||
key: "status",
|
||||
width: 60,
|
||||
title: "最近更新时间",
|
||||
dataIndex: "sysUpdateTime",
|
||||
key: "sysUpdateTime",
|
||||
width: 150,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
@@ -167,38 +177,58 @@
|
||||
return columns;
|
||||
}
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:STvisible", false);
|
||||
};
|
||||
|
||||
const onChange = (pageNumber) => {
|
||||
console.log("Page: ", pageNumber);
|
||||
};
|
||||
const newTest = ()=> {
|
||||
console.log('111');
|
||||
|
||||
const onSelect = (record) => {
|
||||
state.SelectTestData = record
|
||||
};
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
}
|
||||
|
||||
const newTest = ()=> {
|
||||
console.log('创建考试没设计图');
|
||||
}
|
||||
const getTableDate = (tableData) => {
|
||||
let data = tableData;
|
||||
let array = [];
|
||||
data.map((value, index) => {
|
||||
let obj = {
|
||||
key: index+1,
|
||||
sysCreateBy: value.sysCreateBy,
|
||||
paperId: value.paperId,
|
||||
testName:value.testName,
|
||||
paperMode:value.paperMode,
|
||||
sysUpdateTime: value.sysUpdateTime,
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
state.tableData = array;
|
||||
};
|
||||
//获取任务管理列表
|
||||
const getManageList = () => {
|
||||
let obj = {
|
||||
name: "",
|
||||
pageNo: state.pageNo,
|
||||
pageSize: state.pageSize,
|
||||
projectId: 27,
|
||||
projectTaskId: 370,
|
||||
// projectTaskId: props.projectTaskId,
|
||||
status: -1,
|
||||
// "keyWord": "",
|
||||
// "pageIndex": 0,
|
||||
// "pageSize": 0,
|
||||
// "published": true,
|
||||
"keyWord": "",
|
||||
"orderAsc": true,
|
||||
"orderFiled": "",
|
||||
"pageIndex": 0,
|
||||
"pageSize": 0
|
||||
};
|
||||
api
|
||||
.taskStudentList(obj)
|
||||
.queryExaminationPaper(obj)
|
||||
.then((res) => {
|
||||
state.pageNo = res.data.data.pageNo;
|
||||
state.pageSize = res.data.data.pageSize;
|
||||
state.pageSize = res.data.data.pageSize;
|
||||
for (let i = 0; i < res.data.data.rows.length; i++) {
|
||||
state.tabledata.push(res.data.data.rows[i].userInfoBo);
|
||||
}
|
||||
getTableDate(res.data.data)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取时间任务列表失败cc", err);
|
||||
.catch(() => {
|
||||
message.destroy()
|
||||
message.error("获取选择考试列表失败")
|
||||
});
|
||||
};
|
||||
|
||||
@@ -227,8 +257,7 @@
|
||||
}
|
||||
state.tabledata = newArr;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("搜索任务列表失败", err);
|
||||
.catch(() => {
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -240,17 +269,16 @@
|
||||
state.tabledata = [];
|
||||
getManageList();
|
||||
};
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
getManageList();
|
||||
}, 500);
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
closeDrawer,
|
||||
afterVisibleChange,
|
||||
getTableDate,
|
||||
onSelect,
|
||||
onSelectChange,
|
||||
CreatSTText,
|
||||
newTest,
|
||||
tableDataFunc,
|
||||
onMounted,
|
||||
onChange,
|
||||
getManageList,
|
||||
searchTaskList,
|
||||
|
||||
Reference in New Issue
Block a user