mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-22 09:16:46 +08:00
-- 审核bug
This commit is contained in:
@@ -15,34 +15,33 @@
|
||||
<div class="inpbox">
|
||||
<div class="inpbox1">
|
||||
<a-select
|
||||
v-model:value="valueproj"
|
||||
placeholder="请选择内容分类"
|
||||
@change="handleChangeproj"
|
||||
:options="optionsproj"
|
||||
v-model:value="valueproj"
|
||||
value-key="value"
|
||||
:options="[{label:'请选择内容分类',value:''},...calssifyList]"
|
||||
/>
|
||||
</div>
|
||||
<div class="inpbox1">
|
||||
<a-input
|
||||
v-model:value="valuecreater"
|
||||
style="
|
||||
v-model:value="valuecreater"
|
||||
style="
|
||||
width: 270px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
margin-right: 14px;
|
||||
"
|
||||
placeholder="请输入创建人"
|
||||
placeholder="请输入创建人"
|
||||
/>
|
||||
</div>
|
||||
<div class="inpbox1">
|
||||
<a-input
|
||||
v-model:value="valuename"
|
||||
style="
|
||||
v-model:value="valuename"
|
||||
style="
|
||||
width: 270px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
margin-right: 14px;
|
||||
"
|
||||
placeholder="请输入名称"
|
||||
placeholder="请输入名称"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,26 +60,26 @@
|
||||
<div class="tmpl_body">
|
||||
<div class="tmpl_tabbox">
|
||||
<a-table
|
||||
:columns="columns1"
|
||||
:data-source="tableData1"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@expand="expandTable"
|
||||
:scroll="{ x: 1300 }"
|
||||
:pagination="false"
|
||||
:columns="columns1"
|
||||
:data-source="tableData1"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
@expand="expandTable"
|
||||
:scroll="{ x: 1300 }"
|
||||
:pagination="false"
|
||||
/>
|
||||
</div>
|
||||
<div class="tableBox">
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
v-if="total > 10"
|
||||
showSizeChanger="true"
|
||||
show-quick-jumper
|
||||
:pageSize="pageSize"
|
||||
v-model:current="currentPage"
|
||||
:total="total"
|
||||
class="pagination"
|
||||
@change="changePagination"
|
||||
v-if="total > 10"
|
||||
showSizeChanger="true"
|
||||
show-quick-jumper
|
||||
:pageSize="pageSize"
|
||||
v-model:current="currentPage"
|
||||
:total="total"
|
||||
class="pagination"
|
||||
@change="changePagination"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -89,23 +88,16 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
import { courseListView } from "../../api/indexAudit";
|
||||
import {reactive, toRefs, onMounted} from "vue";
|
||||
import {courseListView} from "../../api/indexAudit";
|
||||
import * as api1 from "@/api/index1";
|
||||
|
||||
export default {
|
||||
name: "CoursereViewed",
|
||||
|
||||
setup() {
|
||||
const state = reactive({
|
||||
optionsproj: [
|
||||
{
|
||||
value: "0",
|
||||
label: "Jack",
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
label: "rose",
|
||||
},
|
||||
],
|
||||
calssifyList: [], //分类字典
|
||||
valueproj: "",
|
||||
valuecreater: "",
|
||||
valuename: "",
|
||||
@@ -136,6 +128,7 @@ export default {
|
||||
dataIndex: "content",
|
||||
key: "content",
|
||||
align: "center",
|
||||
customRender: ({text}) => state.calssifyList.find(e => e.value == text)?.label,
|
||||
},
|
||||
{
|
||||
title: "审核状态",
|
||||
@@ -187,26 +180,27 @@ export default {
|
||||
const getList = () => {
|
||||
let objn = {
|
||||
auditStatus: 0,
|
||||
// categoryId: 0,
|
||||
categoryId: state.valueproj,
|
||||
createName: state.valuecreater,
|
||||
name: state.valuename,
|
||||
pageNo: state.currentPage,
|
||||
pageSize: 10,
|
||||
};
|
||||
courseListView(objn)
|
||||
.then((res) => {
|
||||
console.log("获取已审核课程成功", res.data.data);
|
||||
let result = res.data.data.rows;
|
||||
state.total = res.data.data.total;
|
||||
if (res.data.data.total > 0) {
|
||||
setTableData(result);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取已审核课程失败", err);
|
||||
});
|
||||
.then((res) => {
|
||||
console.log("获取已审核课程成功", res.data.data);
|
||||
state.total = res.data.data.total;
|
||||
setTableData(res.data.data.rows);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取已审核课程失败", err);
|
||||
});
|
||||
};
|
||||
const setTableData = (table) => {
|
||||
if(!table || !table.length){
|
||||
state.tableData1 = []
|
||||
return
|
||||
}
|
||||
let data = table;
|
||||
let array = [];
|
||||
data.map((item) => {
|
||||
@@ -216,15 +210,15 @@ export default {
|
||||
type: item.type == 1 ? "线上" : "线下",
|
||||
content: item.categoryId,
|
||||
status:
|
||||
item.auditStatus == 0
|
||||
? "未提交"
|
||||
: item.auditStatus == 1
|
||||
? "提交待审核"
|
||||
: item.auditStatus == 2
|
||||
? "通过"
|
||||
: item.auditStatus == -1
|
||||
? "拒绝"
|
||||
: "-",
|
||||
item.auditStatus == 0
|
||||
? "未提交"
|
||||
: item.auditStatus == 1
|
||||
? "提交待审核"
|
||||
: item.auditStatus == 2
|
||||
? "通过"
|
||||
: item.auditStatus == -1
|
||||
? "拒绝"
|
||||
: "-",
|
||||
creater: item.createName,
|
||||
time: "-",
|
||||
msg: item.description || "-",
|
||||
@@ -234,27 +228,30 @@ export default {
|
||||
state.tableData1 = array;
|
||||
};
|
||||
const reset = () => {
|
||||
(state.valueproj = null),
|
||||
(state.valuecreater = null),
|
||||
(state.valuename = null),
|
||||
getList();
|
||||
};
|
||||
const handleChangeproj = (value, item) => {
|
||||
console.log(value, item);
|
||||
state.valueproj = item.value;
|
||||
(state.valueproj = ''),
|
||||
(state.valuecreater = null),
|
||||
(state.valuename = null),
|
||||
getList();
|
||||
};
|
||||
const changePagination = (pagina) => {
|
||||
state.currentPage = pagina;
|
||||
getList();
|
||||
};
|
||||
onMounted(() => {
|
||||
const getDictList = (param) => api1.getDict({
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
setCode: param
|
||||
}).then((res) => res.data.data.rows)
|
||||
|
||||
onMounted(async () => {
|
||||
getList();
|
||||
//获取分类列表
|
||||
state.calssifyList = (await getDictList("faceclassClass")).map(e => ({label: e.dictName, value: e.dictCode}))
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
getList,
|
||||
setTableData,
|
||||
handleChangeproj,
|
||||
reset,
|
||||
changePagination,
|
||||
};
|
||||
@@ -264,8 +261,10 @@ export default {
|
||||
<style lang="scss">
|
||||
.coursereviewed {
|
||||
width: 100%;
|
||||
|
||||
.tmpl {
|
||||
width: 100%;
|
||||
|
||||
.tmpl_header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -274,33 +273,39 @@ export default {
|
||||
|
||||
margin-left: 32px;
|
||||
margin-right: 32px;
|
||||
|
||||
.tmplh_inp {
|
||||
.inpbox {
|
||||
display: flex;
|
||||
margin-top: 32px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.inpbox1 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 24px;
|
||||
margin-top: 10px;
|
||||
|
||||
.ant-select-selector {
|
||||
border-radius: 8px;
|
||||
width: 270px;
|
||||
height: 40px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
span {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tmplh_btn {
|
||||
display: flex;
|
||||
// margin-left: 38px;
|
||||
margin-top: 42px;
|
||||
|
||||
.btn {
|
||||
padding: 0px 26px 0px 26px;
|
||||
height: 38px;
|
||||
@@ -311,72 +316,90 @@ export default {
|
||||
margin-right: 14px;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
|
||||
.search {
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.btnText1 {
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.btnText2 {
|
||||
color: rgba(64, 158, 255, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #409eff;
|
||||
|
||||
.search {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url("../../assets/images/courseManage/search0.png");
|
||||
}
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
border: 1px solid #388be1;
|
||||
|
||||
.search {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset1.png");
|
||||
}
|
||||
}
|
||||
|
||||
.btn1:hover {
|
||||
background: rgb(255, 255, 255);
|
||||
border: 1px solid #388be1;
|
||||
|
||||
.search {
|
||||
background-image: url("../../assets/images/courseManage/search1.png");
|
||||
}
|
||||
|
||||
.btnText {
|
||||
color: rgba(64, 158, 255, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.btn2:hover {
|
||||
background: rgba(64, 158, 255, 1);
|
||||
|
||||
.search {
|
||||
background-image: url("../../assets/images/courseManage/reset0.png");
|
||||
}
|
||||
|
||||
.btnText {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tmpl_body {
|
||||
padding: 0px 30px;
|
||||
|
||||
.tmpl_tabbox {
|
||||
.operation {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #4ea6ff;
|
||||
|
||||
.nselect {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
||||
.jc {
|
||||
margin-left: 20px;
|
||||
white-space: nowrap;
|
||||
@@ -385,6 +408,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pa {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
|
||||
Reference in New Issue
Block a user