mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 05:46:45 +08:00
feat:移动任务 选择面授
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<div class="ipt_name">课程编号:</div>
|
||||
<div class="fi_input">
|
||||
<a-input
|
||||
v-model:value="value"
|
||||
v-model:value="valueClass"
|
||||
style="width: 240px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入项目名称"
|
||||
/>
|
||||
@@ -37,6 +37,8 @@
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
:options="options1"
|
||||
@change="handleChange"
|
||||
v-model:value="valueContent"
|
||||
allowClear
|
||||
showSearch
|
||||
/>
|
||||
@@ -44,11 +46,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mi_btns">
|
||||
<div class="btn btn1">
|
||||
<div class="btn btn1" @click="search">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2">
|
||||
<div class="btn btn2" @click="reset">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
@@ -63,28 +65,23 @@
|
||||
"
|
||||
:row-selection="rowSelection"
|
||||
:columns="columns1"
|
||||
:data-source="tableData1"
|
||||
:data-source="classTableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:pagination="{
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
hideOnSinglePage: true,
|
||||
pageSizeOptions: [],
|
||||
pageSize: pageSize,
|
||||
current: currentPage,
|
||||
total: tableDataTotal,
|
||||
onChange: (page, pageSize) => {
|
||||
currentPage = page;
|
||||
// console.log('page', page)
|
||||
// 加翻页查找代码
|
||||
// this.setState({
|
||||
// currentPage: page,
|
||||
// }, () => {
|
||||
// this.getMilitaryDeployment()
|
||||
// })
|
||||
},
|
||||
}"
|
||||
:pagination="false"
|
||||
/>
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
v-if="total > 10"
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="changePaginationStu"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
@@ -96,10 +93,17 @@
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
// import { planList } from "../../api/indexTaskadd";
|
||||
import { list } from "../../api/indexTaskadd";
|
||||
import { toDate } from "../../api/method";
|
||||
const options1 = ref([
|
||||
{
|
||||
value: "value1",
|
||||
label: "请选择状态",
|
||||
label: "通用",
|
||||
},
|
||||
{
|
||||
value: "value2",
|
||||
label: "领导",
|
||||
},
|
||||
]);
|
||||
const columns1 = [
|
||||
@@ -172,7 +176,7 @@ export default {
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
tableData1: [
|
||||
classTableData: [
|
||||
{
|
||||
key: "1",
|
||||
num: "JDF2022071100001",
|
||||
@@ -185,8 +189,8 @@ export default {
|
||||
{
|
||||
key: "2",
|
||||
num: "JDF2022071100001",
|
||||
name: "管理能力课程",
|
||||
content: "领导力",
|
||||
name: "时间管理课程",
|
||||
content: "通用力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
@@ -194,7 +198,7 @@ export default {
|
||||
{
|
||||
key: "3",
|
||||
num: "JDF2022071100001",
|
||||
name: "快速换模SMED",
|
||||
name: "时间管理课程",
|
||||
content: "通用力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
@@ -203,80 +207,119 @@ export default {
|
||||
{
|
||||
key: "4",
|
||||
num: "JDF2022071100001",
|
||||
name: "巧妙对话人见人夸",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "5",
|
||||
num: "JDF2022071100001",
|
||||
name: "管理能力课程",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "6",
|
||||
num: "JDF2022071100001",
|
||||
name: "时间管理课程",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "7",
|
||||
num: "JDF2022071100001",
|
||||
name: "时间管理课程",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "8",
|
||||
num: "JDF2022071100001",
|
||||
name: "时间管理课程",
|
||||
content: "领导力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
{
|
||||
key: "9",
|
||||
num: "JDF2022071100001",
|
||||
name: "时间管理课程",
|
||||
content: "领导力",
|
||||
content: "通用力",
|
||||
teacher: "BOE教师",
|
||||
creator: "管理员",
|
||||
time: "2022-10-31 23:12:00",
|
||||
},
|
||||
],
|
||||
currentPage: 1,
|
||||
tableDataTotal: 100,
|
||||
tableDataTotal: null,
|
||||
pageSize: 10,
|
||||
value:'',
|
||||
valueClass: null, //课程编号
|
||||
valueContent: null, //内容分类
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:selfacetVisible", false);
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
getClassList();
|
||||
};
|
||||
const showDrawerSelFacet = () => {
|
||||
state.selfacetvisible = true;
|
||||
// const showDrawerSelFacet = () => {
|
||||
// state.selfacetvisible = true;
|
||||
// };
|
||||
//获取面授课列表
|
||||
const getClassList = (obj) => {
|
||||
let objn = obj || {
|
||||
auditStatus: 0,
|
||||
beginTime: 0,
|
||||
categoryId: 0,
|
||||
createName: "",
|
||||
endTime: 0,
|
||||
name: "",
|
||||
pageNo: state.currentPage,
|
||||
pageSize: 10,
|
||||
projectName: "",
|
||||
};
|
||||
list(objn)
|
||||
.then((res) => {
|
||||
console.log(res.data.data.rows);
|
||||
let result = res.data.data;
|
||||
state.tableDataTotal = result.total;
|
||||
if (result.total > 0) {
|
||||
getClassData(result.rows);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取列表失败", err.data);
|
||||
});
|
||||
};
|
||||
|
||||
const getClassData = (tabledata) => {
|
||||
let data = tabledata;
|
||||
let array = [];
|
||||
data.map((value) => {
|
||||
let obj = {
|
||||
key: value.offcourseId,
|
||||
num: value.offcourseId,
|
||||
name: value.name,
|
||||
teacher: value.teacher,
|
||||
creator: value.teacher,
|
||||
time: toDate(value.publishTime / 1000, "Y-M-D"),
|
||||
categoryId: value.categoryId,
|
||||
//需要判断content
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
state.classTableData = array;
|
||||
};
|
||||
|
||||
const handleChange = (value, option) => {
|
||||
console.log("改变了", value, option);
|
||||
console.log(state.valueContent);
|
||||
};
|
||||
//重置
|
||||
const reset = () => {
|
||||
state.valueClass = null;
|
||||
state.valueContent = null;
|
||||
//重新获取列表
|
||||
getClassList();
|
||||
};
|
||||
//搜索
|
||||
const search = () => {
|
||||
let obj = {
|
||||
auditStatus: 0,
|
||||
beginTime: 0,
|
||||
categoryId: 0, //分类
|
||||
createName: "",
|
||||
endTime: 0,
|
||||
name: "",
|
||||
pageNo: state.currentPage,
|
||||
pageSize: 10,
|
||||
projectName: "",
|
||||
};
|
||||
getClassList(obj);
|
||||
};
|
||||
const changePaginationStu = (page) => {
|
||||
state.currentPage = page;
|
||||
getClassList();
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
showDrawerSelFacet,
|
||||
// showDrawerSelFacet,
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
options1,
|
||||
columns1,
|
||||
rowSelection,
|
||||
getClassData,
|
||||
handleChange,
|
||||
reset,
|
||||
getClassList,
|
||||
search,
|
||||
changePaginationStu,
|
||||
// change,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user