mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-20 00:06:47 +08:00
添案例接口添多数据情况批量标记弹窗封装新增查答卷查投票抽屉考勤面管添在线注释及清空考和测管内容判断
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
<div class="btnss" style="margin-top: 20px">
|
||||
<div
|
||||
class="btn btn1"
|
||||
@click="showopen"
|
||||
@click="godie"
|
||||
style="margin-right: 20px; cursor: pointer"
|
||||
>
|
||||
<div class="img2"></div>
|
||||
@@ -72,16 +72,39 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab" style="margin-top: 20px; margin-bottom: 100px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
:scroll="{ x: 900 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
/>
|
||||
<!-- <a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:scroll="{ x: 900 }"
|
||||
:pagination="false"
|
||||
/> -->
|
||||
<div v-if="itemsType == 5">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tabledata"
|
||||
:row-selection="{
|
||||
selectedRowKeys:selectedRowKeys,
|
||||
onChange:onSelectChange,
|
||||
onSelect:onSelect,
|
||||
}"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:scroll="{ x: 900 }"
|
||||
:pagination="false"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="itemsType == 10">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:scroll="{ x: 900 }"
|
||||
:pagination="false"
|
||||
/>
|
||||
</div>
|
||||
<div class="tableBox">
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
@@ -102,16 +125,13 @@
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
</div>
|
||||
<div class="noticebox" v-show="open">
|
||||
<div><img src="../../assets/images/taskpage/check.png" /></div>
|
||||
<div class="notext">催促学员成功</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
|
||||
import { toRefs, reactive } from "vue";
|
||||
import { message } from 'ant-design-vue';
|
||||
import * as api from "../../api/index";
|
||||
export default {
|
||||
name: "TestManage",
|
||||
@@ -160,7 +180,19 @@ export default {
|
||||
label: "已完成",
|
||||
},
|
||||
],
|
||||
tabledata: [],
|
||||
tabledata: [
|
||||
{
|
||||
workNum:1,
|
||||
status:"已完成",
|
||||
operation:"",
|
||||
},
|
||||
{
|
||||
workNum:1,
|
||||
status:"未完成",
|
||||
operation:"",
|
||||
}
|
||||
],
|
||||
selectedRowKeys:[],
|
||||
});
|
||||
const tableDataFunc = () => {
|
||||
if(props.itemsType == 10){
|
||||
@@ -303,48 +335,103 @@ export default {
|
||||
|
||||
|
||||
};
|
||||
//考试、测评管理列表操作
|
||||
//考试管理列表操作
|
||||
const ListOpera = () => {
|
||||
let arr = state.tabledata;
|
||||
console.log(arr,'-=-=-=-=-=-=-=-=--=-==----=-=-=-');
|
||||
arr.map((value) => {
|
||||
value.operation = (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
if(props.itemsType == 5){
|
||||
arr.map((value) => {
|
||||
if(value.status == '已完成'){
|
||||
value.operation = (
|
||||
<div
|
||||
class="operation"
|
||||
onClick={() => {
|
||||
console.log(state.tabledata,'++++++++++++');
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
查看
|
||||
>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
onClick={() => {
|
||||
console.log('123')
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
state.tabledata = arr;
|
||||
console.log(state.tabledata,'-----------');
|
||||
);
|
||||
} else {
|
||||
value.operation = (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<a-button
|
||||
type="link"
|
||||
class="operation"
|
||||
style="cursor:pointer;margin-right:10px;"
|
||||
disabled
|
||||
>
|
||||
查看
|
||||
</a-button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
ListOpera();
|
||||
const onSelect = (record) => {
|
||||
console.log(record);
|
||||
}
|
||||
const onSelectChange = (selectRowKeys) => {
|
||||
state.selectedRowKeys = selectRowKeys
|
||||
}
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:TMvisible", false);
|
||||
};
|
||||
const afterVisibleChange = () => {
|
||||
getManageList();
|
||||
};
|
||||
const selectProjectName = (value, index) => {
|
||||
console.log("value", value, index);
|
||||
state.projectName = value;
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:TMvisible", false);
|
||||
};
|
||||
const showopen = () => {
|
||||
state.open = true;
|
||||
//催促
|
||||
const godie = () => {
|
||||
message.destroy()
|
||||
message.success("催促考试成功")
|
||||
};
|
||||
//换页
|
||||
const onChange = (pageNumber) => {
|
||||
console.log("Page: ", pageNumber);
|
||||
};
|
||||
|
||||
//渲染列表
|
||||
const getTableDate = (tableData) => {
|
||||
let data = tableData
|
||||
let array = []
|
||||
data.map((item,index)=>{
|
||||
let obj = {
|
||||
key : index+1,
|
||||
workNum : item.workNum,
|
||||
userName : item.userName,
|
||||
deptName : item.deptName,
|
||||
jobName : item.jobName,
|
||||
testNum : item.testNum,
|
||||
score : item.score,
|
||||
time : item.time,
|
||||
status : "已完成",
|
||||
operation:"",
|
||||
}
|
||||
array.push(obj)
|
||||
})
|
||||
state.tabledata = array
|
||||
}
|
||||
//获取任务管理列表
|
||||
const getManageList = () => {
|
||||
let obj = {
|
||||
@@ -361,9 +448,7 @@ export default {
|
||||
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.rows)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取测试任务列表失败", err);
|
||||
@@ -407,28 +492,15 @@ export default {
|
||||
state.tabledata = [];
|
||||
getManageList();
|
||||
};
|
||||
|
||||
let timer;
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
getManageList();
|
||||
}, 1000);
|
||||
|
||||
timer = setInterval(() => {
|
||||
state.open = false;
|
||||
}, 3000);
|
||||
});
|
||||
onUnmounted(() => {
|
||||
clearInterval(timer);
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
closeDrawer,
|
||||
afterVisibleChange,
|
||||
tableDataFunc,
|
||||
showopen,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
onSelect,
|
||||
onSelectChange,
|
||||
godie,
|
||||
onChange,
|
||||
getManageList,
|
||||
searchTaskList,
|
||||
@@ -589,6 +661,10 @@ export default {
|
||||
}
|
||||
}
|
||||
.tab {
|
||||
.ant-table-thead{
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user