fix:面授课三级分类修改

This commit is contained in:
wyx
2023-01-16 09:56:04 +08:00
parent f3f6fac026
commit 956a4eadcf
5 changed files with 67 additions and 28 deletions

View File

@@ -41,7 +41,7 @@
<div class="select">
<a-tree-select
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
v-model:value="categoryId"
v-model:value="sysTypeId"
show-search
style="width: 200px"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
@@ -3281,6 +3281,7 @@ export default defineComponent({
createName: "",
auditStatus: null,
categoryId: undefined,
sysTypeId: undefined,
projectTime: "",
//列表
@@ -3731,7 +3732,7 @@ export default defineComponent({
// 渲染列表1操作
const getTableDate = async () => {
console.log('我是点击搜索的数据',state.categoryId)
console.log('我是点击搜索的数据',state.sysTypeId)
// let datas = state.tableData1;
let startTime = "";
let endTime = "";
@@ -3749,7 +3750,8 @@ export default defineComponent({
pageNo: state.currentPage1,
pageSize: state.pageSize1,
auditStatus: state.auditStatus,
categoryId: state.categoryId,
// categoryId: state.categoryId,
sysTypeId: state.sysTypeId,
projectName: state.projectName,
name: state.name,
createName: state.createName,
@@ -3768,7 +3770,7 @@ export default defineComponent({
key: "offcourseId",
num: "num",
name: "name",
content: "categoryId",
content: "sysTypeId",
courseform: "type",
project: "projectName",
stunum: "studentCnt",
@@ -3786,7 +3788,7 @@ export default defineComponent({
datas.forEach((itm) => {
itm.pageNo = pageNo;
itm.contentTxt = findClassFullName(sysTypeOptions.value,itm.categoryId) || '-'
itm.contentTxt = findClassFullName(sysTypeOptions.value,itm.sysTypeId) || '-'
});
state.tableData1 = datas;
};
@@ -3812,7 +3814,7 @@ export default defineComponent({
state.name = "";
state.createName = "";
state.auditStatus = null;
state.categoryId = null;
state.sysTypeId = null;
state.projectTime = "";
getTableDate();
};
@@ -4887,7 +4889,8 @@ export default defineComponent({
picUrl: item.picUrl,
targetUser: item.targetUser,
meaning: item.meaning,
categoryId: item.categoryId,
// categoryId: item.categoryId,
sysTypeId: item.sysTypeId,
sceneId: item.sceneId,
tips: item.tips,
teacherId: item.teacherId, //?
@@ -4955,7 +4958,7 @@ export default defineComponent({
state.currentPage1
}&pageSize=${state.pageSize1}&auditStatus=${
state.auditStatus ? state.auditStatus : ""
}&categoryId=${state.categoryId ? state.categoryId : ""}&projectName=${
}&sysTypeId=${state.sysTypeId ? state.sysTypeId : ""}&projectName=${
state.projectName ? state.projectName : ""
}&name=${state.name ? state.name : ""}&createName=${
state.createName ? state.createName : ""

View File

@@ -370,13 +370,13 @@ export default defineComponent({
const sysTypeOptions = computed(() => store.state.sysType);
watch(() => props.detail.categoryId, () => {
watch(() => props.detail.sysTypeId, () => {
state.categoryName = findClassFullName(sysTypeOptions.value)
})
function findClassFullName(list, name = '') {
return list && list.length && list
.map(e => props.detail.categoryId == e.dictCode ? name ? name + '-' + e.dictName : e.dictName : findClassFullName(e.children, name ? name + '-' + e.dictName : e.dictName))
.map(e => props.detail.sysTypeId == e.dictCode ? name ? name + '-' + e.dictName : e.dictName : findClassFullName(e.children, name ? name + '-' + e.dictName : e.dictName))
.filter(name => name)
.join('') || ''
}

View File

@@ -766,7 +766,8 @@ export default defineComponent({
picUrl: state.feng_mian_1,
targetUser: state.qdms_inputV2,
meaning: state.qdms_inputV3,
categoryId: state.fen_lei,
// categoryId: state.fen_lei,
sysTypeId: state.fen_lei,
sceneContent: state.chang_jin,
tips: state.tags_val ? state.tags_val.join(",") : null,
// teacherId: state.member.value,
@@ -780,7 +781,8 @@ export default defineComponent({
const checkList = [
postData.name,
postData.targetUser,
postData.categoryId,
// postData.categoryId,
postData.sysTypeId,
// postData.teacherId,
postData.picUrl,
postData.intro,
@@ -855,7 +857,8 @@ export default defineComponent({
state.feng_mian_1 = item.picUrl;
state.qdms_inputV2 = item.targetUser;
state.qdms_inputV3 = item.meaning;
state.fen_lei = item.categoryId;
// state.fen_lei = item.categoryId;
state.fen_lei = item.sysTypeId;
state.chang_jin = String(item.sceneContent ? item.sceneContent : '');
state.tags_val = item.tips ? item.tips.split(",") : [];
state.qdms_inputV6 = item.intro;

View File

@@ -427,7 +427,7 @@ export default {
state.loading = true
let objn = {
auditStatus: 0,
categoryId: Number(state.valueproj),
sysTypeId: state.valueproj,
createName: state.valuecreater,
name: state.valuename,
pageNo: state.currentPage,
@@ -457,7 +457,7 @@ export default {
number: n + 1 + (state.currentPage - 1) * 10,
name: item.name || "- ",
type: item.type == 1 ? "线上" : "线下",
content: sHX(item.categoryId),
content: sHX(item.sysTypeId),
status:
item.auditStatus == 0
? "未提交"

View File

@@ -39,20 +39,30 @@
</div>
<div class="inpbox1">
<a-input v-model:value="valuecreater" style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
" placeholder="请输入创建人" />
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
" placeholder="请输入创建人" />
</div>
<div class="inpbox1">
<a-input v-model:value="valuename" style="
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
" placeholder="请输入名称" />
width: 270px;
height: 40px;
border-radius: 8px;
margin-right: 14px;
" placeholder="请输入名称" />
</div>
<!-- <div class="select addTimeBox">
<div class="addTime">创建时间</div>
<a-range-picker
v-model:value="searchParam"
style="width: 420px"
format="YYYY-MM-DD"
separator="至"
:placeholder="[' 开始时间', ' 结束时间']"
/>
</div> -->
</div>
</div>
<div class="tmplh_btn">
@@ -441,7 +451,8 @@ export default {
state.loading = true
let objn = {
auditStatus: 1,
categoryId: state.valueproj,
// categoryId: state.valueproj,
sysTypeId: state.valueproj,
createName: state.valuecreater,
name: state.valuename,
pageNo: state.currentPage,
@@ -510,7 +521,8 @@ export default {
const searchList = () => {
let objn = {
auditStatus: 1,
categoryId: state.valueproj,
// categoryId: state.valueproj,
sysTypeId: state.valueproj,
createName: state.valuecreater,
name: state.valuename,
pageNo: state.currentPage,
@@ -553,7 +565,7 @@ export default {
number: i + 1 + (state.currentPage - 1) * 10,
name: item.name,
type: item.type == 1 ? "线上" : "线下",
content: sHX(item.categoryId),
content: sHX(item.sysTypeId),
status:
item.status == 0
? "未提交"
@@ -673,6 +685,27 @@ export default {
};
</script>
<style lang="scss">
.addTimeBox {
top: 4px;
position: relative;
display: flex;
align-items: center;
.addTime {
position: absolute;
z-index: 10;
margin-left: 10px;
color: rgba(0, 0, 0, 0.4);
}
.ant-picker {
padding-left: 85px;
}
.ant-picker-range .ant-picker-active-bar {
margin-left: 85px;
}
}
.courAuditModal {
.ant-modal {
width: 640px !important;