feat:增加项目-系统考试-查看答卷

This commit is contained in:
wyx
2023-02-13 10:53:20 +08:00
5 changed files with 58 additions and 316 deletions

View File

@@ -437,8 +437,7 @@ export default {
}); });
}; };
const getDictList = async (param) => const getDictList = async (param) =>
api1 api1.getDict({
.getDict({
pageNo: 1, pageNo: 1,
pageSize: 20, pageSize: 20,
setCode: param, setCode: param,

View File

@@ -4146,55 +4146,58 @@ export default defineComponent({
if (type === "1") { if (type === "1") {
return; return;
} }
state.offcourseId = itm.offcourseId; // console.log(itm)
state.offcourseId = itm.id;
// const item = await detail({ const item = await detail({
// offcourseId: Number(state.offcourseId), offcourseId: Number(state.offcourseId),
// }).then((res) => { }).then((res) => {
// if (res.data.code === 200) return res.data.data; if (res.data.code === 200) return res.data.data;
// }); });
// state.statusJuJue = Number(item.auditStatus) === -1 ? 1 : 0;
// if (Number(item.auditStatus) === 2 && Number(item.status) === 1) { state.statusJuJue = Number(item.auditStatus) === -1 ? 1 : 0;
// state.statusTingQi = 1;
// }
// if (Number(item.auditStatus) === 2 && Number(item.status) === 0) {
// state.statusTingQi = 0;
// }
// state.qdms_inputV1 = item.name; if (Number(item.auditStatus) === 2 && Number(item.status) === 1) {
// // state.imageUrl = item.picUrl; state.statusTingQi = 1;
// state.feng_mian_1 = item.picUrl; }
// state.qdms_inputV2 = item.targetUser; if (Number(item.auditStatus) === 2 && Number(item.status) === 0) {
// state.qdms_inputV3 = item.meaning; state.statusTingQi = 0;
// state.fen_lei = String(item.categoryId); }
// state.chang_jin = String(item.sceneId);
// state.tags_val = item.tips ? item.tips.split(",") : [];
// //state.qdms_inputV5 = item.teacherId;
// state.teacher = item.teacher;
// state.teacherId = item.teacherId;
// state.qdms_inputV6 = item.intro;
// state.member = { value: item.teacherId, name: item.teacher };
// if (item.attach == "") {
// state.imgList = [];
// } else {
// if (item.attach.indexOf(",")) {
// const arr = item.attach.split(",");
// arr.forEach((item) => {
// state.imgList.push({ img: item });
// });
// } else {
// state.imgList = [{ img: item.attach }];
// }
// }
// valueHtml.value = item.outline; state.qdms_inputV1 = item.name;
// state.imageUrl = item.picUrl;
state.feng_mian_1 = item.picUrl;
state.qdms_inputV2 = item.targetUser;
state.qdms_inputV3 = item.meaning;
state.fen_lei = String(item.categoryId);
state.chang_jin = String(item.sceneId);
state.tags_val = item.tips ? item.tips.split(",") : [];
//state.qdms_inputV5 = item.teacherId;
state.teacher = item.teacher;
state.teacherId = item.teacherId;
state.qdms_inputV6 = item.intro;
state.member = { value: item.teacherId, name: item.teacher };
if (item.attach == "") {
state.imgList = [];
} else {
if (item.attach.indexOf(",")) {
const arr = item.attach.split(",");
arr.forEach((item) => {
state.imgList.push({ img: item });
});
} else {
state.imgList = [{ img: item.attach }];
}
}
valueHtml.value = item.outline;
// state.ft_hs = true; // state.ft_hs = true;
CourseModalRef.value.visibleOpen(state.offcourseId, null); CourseModalRef.value.visibleOpen(state.offcourseId, null);
state.ft_eidt = true; state.ft_eidt = true;
getTea(); // getTea();
}; };
// handleTagChange // handleTagChange
@@ -4242,7 +4245,7 @@ export default defineComponent({
if (type === "1") { if (type === "1") {
return; return;
} }
state.offcourseId = item.offcourseId; state.offcourseId = item.id;
state.delete_hs = true; state.delete_hs = true;
state.del_hs = true; state.del_hs = true;

View File

@@ -281,8 +281,7 @@
</a-modal> </a-modal>
</template> </template>
<script> <script>
import { reactive, toRefs, defineComponent, ref, watch, computed } from "vue"; import { reactive, toRefs, defineComponent, watch, computed } from "vue";
import * as api1 from "../../../api/index1";
import { useStore } from "vuex"; import { useStore } from "vuex";
export default defineComponent({ export default defineComponent({
@@ -302,136 +301,6 @@ export default defineComponent({
const state = reactive({ const state = reactive({
imgList: [], imgList: [],
options2222: [
{
title: "领导力",
value: "100",
children: [
{
title: "管理业务",
value: "1001",
},
{
title: "管理团队",
value: "1002",
},
{
title: "管理自我",
value: "1003",
},
],
},
{
title: "专业力",
value: "200",
children: [
{
title: "研发",
value: "2001",
},
{
title: "系统和解决方案",
value: "2002",
},
{
title: "生产技术与制造",
value: "2003",
},
{
title: "供应链",
value: "2004",
},
{
title: "营销",
value: "2005",
},
{
title: "品质",
value: "2006",
},
{
title: "专业职能",
value: "2007",
children: [
{
title: "战略与企划",
value: "200701",
},
{
title: "流程管理",
value: "200702",
},
{
title: "业绩管理",
value: "200703",
},
{
title: "项目管理",
value: "200704",
},
{
title: "信息技术",
value: "200705",
},
{
title: "环境与安全",
value: "200706",
},
{
title: "人力资源",
value: "200707",
},
{
title: "企业文化",
value: "200708",
},
{
title: "品牌",
value: "200709",
},
{
title: "财务",
value: "200710",
},
{
title: "法务",
value: "200711",
},
{
title: "风险控制",
value: "200712",
},
{
title: "行政",
value: "200713",
},
],
},
{
title: "医工",
value: "2008",
},
],
},
{
title: "通用力",
value: "300",
children: [
{
title: "职业操守与道德",
value: "3001",
},
{
title: "职业素养与技能",
value: "3002",
},
{
title: "规章制度",
value: "3003",
},
],
},
],
categoryName: "", categoryName: "",
ceshi: "https://u-pre.boe.com/upload/测试下载ppt2-1671002026755.pptx", ceshi: "https://u-pre.boe.com/upload/测试下载ppt2-1671002026755.pptx",
ceshi2: "http://43.143.139.204:12016/测试下载ppt3-1671001683026.pptx", ceshi2: "http://43.143.139.204:12016/测试下载ppt3-1671001683026.pptx",
@@ -441,7 +310,7 @@ export default defineComponent({
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/", : location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
}); });
const sysTypeOptions = computed(() => store.state.sysType); const sysTypeOptions = computed(() => store.state.content_type);
watch( watch(
() => props.detail.sysTypeId, () => props.detail.sysTypeId,
@@ -452,22 +321,7 @@ export default defineComponent({
function findClassFullName(list, name = "") { function findClassFullName(list, name = "") {
return ( return (
(list && (list && list.length && list.map((e) => props.detail.sysTypeId == e.code ? name ? name + "-" + e.name : e.name : findClassFullName(e.children, name ? name + "-" + e.name : e.name)).filter((name) => name).join("")) || ""
list.length &&
list
.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("")) ||
""
); );
} }
@@ -478,72 +332,13 @@ export default defineComponent({
return "-"; return "-";
} }
}; };
const filterSenceTxt = (txt) => {
let str = "-";
if (txt) {
options3.value.forEach((item) => {
if (item.value === String(txt)) {
str = item.label;
}
});
}
return str;
};
const handleCancel = () => { const handleCancel = () => {
emit("cancel"); emit("cancel");
}; };
//获取分类、场景-----------字典配置-------------------------------
const options2 = ref([]);
const options3 = ref([]);
const getDictList = (param) => {
let obj = {
pageNo: 1,
pageSize: 20,
setCode: param,
};
api1
.getDict(obj)
.then((res) => {
console.log("获取字典成功", res);
if (res.data.code === 200) {
if (param === "faceclassClass") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictCode,
label: item.dictName,
});
});
options2.value = state.options2222;
}
if (param === "faceclassScene") {
let arr = res.data.data.rows;
let newArr = [];
arr.forEach((item) => {
newArr.push({
value: item.dictCode,
label: item.dictName,
});
});
options3.value = newArr;
}
}
})
.catch((err) => {
console.log("获取字典失败", err);
});
};
getDictList("faceclassClass");
getDictList("faceclassScene");
//获取分类、场景----------------字典配置---------------------------
return { return {
...toRefs(state), ...toRefs(state),
filterTxt, filterTxt,
filterSenceTxt,
handleCancel, handleCancel,
}; };
}, },

View File

@@ -14,24 +14,15 @@
<div class="tmplh_inp"> <div class="tmplh_inp">
<div class="inpbox"> <div class="inpbox">
<div class="inpbox1"> <div class="inpbox1">
<!-- <a-tree-select
<a-select
v-model:value="valueproj"
value-key="value"
:options="[
{ label: '请选择内容分类', value: '' },
...calssifyList,
]"
/>-->
<a-tree-select
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body" :getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
v-model:value="valueproj" v-model:value="valueproj"
show-search show-search
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
:fieldNames="{ :fieldNames="{
children: 'children', children: 'children',
label: 'dictName', label: 'name',
value: 'dictCode', value: 'code',
}" }"
placeholder="请选择内容分类" placeholder="请选择内容分类"
allow-clear allow-clear
@@ -128,7 +119,6 @@
<script> <script>
import {reactive, toRefs, onMounted, computed} from "vue"; import {reactive, toRefs, onMounted, computed} from "vue";
import { courseListView } from "../../api/indexAudit"; import { courseListView } from "../../api/indexAudit";
import * as api1 from "@/api/index1";
import {useStore} from "vuex"; import {useStore} from "vuex";
import dayjs from "dayjs"; import dayjs from "dayjs";
@@ -422,11 +412,11 @@ export default {
const store = useStore(); const store = useStore();
const sysTypeOptions = computed(() => store.state.sysType); const sysTypeOptions = computed(() => store.state.content_type);
function findClassFullName(list,classify,name=''){ function findClassFullName(list,classify,name=''){
return list && list.length && list.map(e=>{ return list && list.length && list.map(e=>{
return classify == e.dictCode ? name?name+'-'+e.dictName:e.dictName : findClassFullName(e.children,classify,name?name+'-'+e.dictName:e.dictName) return classify == e.code ? name?name+'-'+e.name:e.name : findClassFullName(e.children,classify,name?name+'-'+e.name:e.name)
}).filter(name=>name).join('') }).filter(name=>name).join('')
} }
@@ -503,22 +493,9 @@ export default {
state.currentPage = pagina; state.currentPage = pagina;
getList(); getList();
}; };
const getDictList = (param) =>
api1
.getDict({
pageNo: 1,
pageSize: 20,
setCode: param,
})
.then((res) => res.data.data.rows);
onMounted(async () => { onMounted(async () => {
getList(); getList();
//获取分类列表
state.calssifyList = (await getDictList("faceclassClass")).map((e) => ({
label: e.dictName,
value: e.dictCode,
}));
}); });
// 显示审核 // 显示审核

View File

@@ -14,19 +14,11 @@
<div class="tmplh_inp"> <div class="tmplh_inp">
<div class="inpbox"> <div class="inpbox">
<div class="inpbox1"> <div class="inpbox1">
<!-- <a-tree-select
<a-select
v-model:value="valueproj"
:options="[
{ label: '请选择内容分类', value: '' },
...calssifyList,
]"
/>-->
<a-tree-select
:fieldNames="{ :fieldNames="{
children: 'children', children: 'children',
label: 'dictName', label: 'name',
value: 'dictCode', value: 'code',
}" }"
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body" :getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
v-model:value="valueproj" v-model:value="valueproj"
@@ -148,7 +140,6 @@ import { list, courseAuditView, courseDetail } from "../../api/indexAudit";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import SeeModal from "../courselibrary/components/seeModal.vue"; import SeeModal from "../courselibrary/components/seeModal.vue";
import { iframeUrl } from "../../api/method"; import { iframeUrl } from "../../api/method";
import * as api1 from "@/api/index1";
import {useStore} from "vuex"; import {useStore} from "vuex";
import dayjs from "dayjs"; import dayjs from "dayjs";
@@ -423,11 +414,11 @@ export default {
}); });
const store = useStore(); const store = useStore();
const sysTypeOptions = computed(() => store.state.sysType); const sysTypeOptions = computed(() => store.state.content_type);
function findClassFullName(list,classify,name=''){ function findClassFullName(list,classify,name=''){
return list && list.length && list.map(e=>{ return list && list.length && list.map(e=>{
return classify == e.dictCode ? name?name+'-'+e.dictName:e.dictName : findClassFullName(e.children,classify,name?name+'-'+e.dictName:e.dictName) return classify == e.code ? name?name+'-'+e.name:e.name : findClassFullName(e.children,classify,name?name+'-'+e.name:e.name)
}).filter(name=>name).join('') }).filter(name=>name).join('')
} }
@@ -435,20 +426,6 @@ export default {
const sHX = (classify) => { const sHX = (classify) => {
return findClassFullName(sysTypeOptions.value,classify) || '-' return findClassFullName(sysTypeOptions.value,classify) || '-'
} }
/*
* 获取字典列表
* param faceclassPic | faceclassClass | faceclassScene
* */
const getDictList = (param) =>
api1
.getDict({
pageNo: 1,
pageSize: 20,
setCode: param,
})
.then((res) => res.data.data.rows);
const getFaceList = () => { const getFaceList = () => {
state.loading = true state.loading = true
let objn = { let objn = {
@@ -462,10 +439,6 @@ export default {
projectName: "", projectName: "",
}; };
console.log(objn);
// 测试数据先放下
// setFaceData([{ name: "面授课审核", category_id: "8", scene_id: "8" }]);
list(objn) list(objn)
.then((res) => { .then((res) => {
console.log("获取面授列表成功", res); console.log("获取面授列表成功", res);
@@ -658,11 +631,6 @@ export default {
}; };
onMounted(async () => { onMounted(async () => {
getFaceList(); getFaceList();
//获取分类列表
state.calssifyList = (await getDictList("faceclassClass")).map((e) => ({
label: e.dictName,
value: e.dictCode,
}));
}); });
// 禁止用户编辑文本框内容 // 禁止用户编辑文本框内容