-- 审核bug

This commit is contained in:
yuping
2022-11-30 02:22:18 +08:00
parent 30ec2f1560
commit 721062c602
5 changed files with 374 additions and 224 deletions

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -57,14 +57,14 @@
@change="rankTimeChange" @change="rankTimeChange"
/> />
</div> </div>
<div class="inpbox1"> <!-- <div class="inpbox1">-->
<a-select <!-- <a-select-->
v-model:value="valuestate" <!-- v-model:value="valuestate"-->
placeholder="请选择审核状态" <!-- placeholder="请选择审核状态"-->
@change="handleChangeproj" <!-- @change="handleChangeproj"-->
:options="optionsproj" <!-- :options="optionsproj"-->
/> <!-- />-->
</div> <!-- </div>-->
</div> </div>
</div> </div>
<div class="tmplh_btn"> <div class="tmplh_btn">
@@ -193,8 +193,8 @@ export default {
{ {
title: "所属项目", title: "所属项目",
dataIndex: "belong", dataIndex: "sourceBelongName",
key: "belong", key: "sourceBelongName",
align: "center", align: "center",
width: "10%", width: "10%",
}, },
@@ -317,6 +317,7 @@ export default {
name: item.name, name: item.name,
belong: "", belong: "",
manager: item.manager || "-", manager: item.manager || "-",
sourceBelongName: item.sourceBelongName,
status: status:
item.status == 0 item.status == 0
? "草稿" ? "草稿"
@@ -337,6 +338,7 @@ export default {
number: item.projectId, number: item.projectId,
name: item.name, name: item.name,
belong: "", belong: "",
sourceBelongName: item.sourceBelongName,
manager: item.manager || "-", manager: item.manager || "-",
status: status:
item.status == 0 item.status == 0

View File

@@ -154,8 +154,8 @@ export default {
{ {
title: "所属项目", title: "所属项目",
dataIndex: "belong", dataIndex: "sourceBelongName",
key: "belong", key: "sourceBelongName",
align: "center", align: "center",
width: "11%", width: "11%",
}, },
@@ -250,6 +250,7 @@ export default {
number: item.projectId, number: item.projectId,
name: item.name, name: item.name,
belong: item.parentId, belong: item.parentId,
sourceBelongName: item.sourceBelongName,
manager: item.manager || "-", manager: item.manager || "-",
status: status:
item.status == 0 item.status == 0
@@ -277,6 +278,7 @@ export default {
number: item.projectId, number: item.projectId,
name: item.name, name: item.name,
belong: item.parentId, belong: item.parentId,
sourceBelongName: item.sourceBelongName,
manager: item.manager || "-", manager: item.manager || "-",
status: status:
item.status == 0 item.status == 0

View File

@@ -576,7 +576,7 @@
<!-- 编辑多层项目弹窗 - end --> <!-- 编辑多层项目弹窗 - end -->
<!-- 创建多层子项目弹窗 --> <!-- 创建多层子项目弹窗 -->
<div> <div>
<a-modal <a-modalbe
v-model:visible="doublesonpro" v-model:visible="doublesonpro"
:title="null" :title="null"
@ok="closeModal3" @ok="closeModal3"
@@ -705,7 +705,7 @@
> >
</div> </div>
</div> </div>
</a-modal> </a-modalbe>
</div> </div>
<!-- 创建多层子项目弹窗 --> <!-- 创建多层子项目弹窗 -->
<!-- 编辑多层子项目弹窗 start--> <!-- 编辑多层子项目弹窗 start-->