mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 23:06:47 +08:00
feat:修改面授课
This commit is contained in:
@@ -10,18 +10,28 @@
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">{{ taskIndex >= 0 ? "编辑" : "添加" }}考试</div>
|
||||
<div class="headerTitle">
|
||||
{{ taskIndex >= 0 ? "编辑" : "添加" }}考试
|
||||
</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;">
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding-top: 0px;
|
||||
margin-top: 20px;
|
||||
margin-left: 32px;
|
||||
"
|
||||
>
|
||||
<div>
|
||||
<button
|
||||
:disabled="taskIndex >= 0"
|
||||
style="width: 100px; cursor: pointer;"
|
||||
style="width: 100px; cursor: pointer"
|
||||
@click="changeOuter(1)"
|
||||
:class="formData.examType === 1 ? 'outer' : 'notOuter'"
|
||||
>
|
||||
@@ -29,7 +39,7 @@
|
||||
</button>
|
||||
<button
|
||||
:disabled="taskIndex >= 0"
|
||||
style="width: 100px; cursor: pointer;"
|
||||
style="width: 100px; cursor: pointer"
|
||||
@click="changeOuter(2)"
|
||||
:class="formData.examType === 2 ? 'outer' : 'notOuter'"
|
||||
>
|
||||
@@ -71,16 +81,30 @@
|
||||
</div>
|
||||
<span style="margin-right: 3px">选择试卷:</span>
|
||||
</div>
|
||||
<s-test v-model:id="formData.examinationPaperId" v-model:name="formData.examinationTestName">
|
||||
<s-test
|
||||
v-model:id="formData.examinationPaperId"
|
||||
v-model:name="formData.examinationTestName"
|
||||
>
|
||||
<div class="btnbox">
|
||||
<button class="xkbtn" style="margin:0" :disabled="taskIndex >= 0">
|
||||
<button
|
||||
class="xkbtn"
|
||||
style="margin: 0"
|
||||
:disabled="taskIndex >= 0"
|
||||
>
|
||||
{{ formData.examinationPaperId ? "重选" : "选择" }}试卷
|
||||
</button>
|
||||
</div>
|
||||
</s-test>
|
||||
<div v-if="formData.examinationPaperId">
|
||||
<a-tag closable color="processing" @close="delTag" :closeIcon="true">
|
||||
<span style="font-size: 14px; line-height: 33px">{{ formData.examinationTestName }}</span>
|
||||
<a-tag
|
||||
closable
|
||||
color="processing"
|
||||
@close="delTag"
|
||||
:closeIcon="true"
|
||||
>
|
||||
<span style="font-size: 14px; line-height: 33px">{{
|
||||
formData.examinationTestName
|
||||
}}</span>
|
||||
</a-tag>
|
||||
</div>
|
||||
</div>
|
||||
@@ -169,7 +193,9 @@
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px;margin-top: 10px;">考试限制:</span>
|
||||
<span style="margin-right: 3px; margin-top: 10px"
|
||||
>考试限制:</span
|
||||
>
|
||||
</div>
|
||||
<div class="kqszbox">
|
||||
<div class="setbox">
|
||||
@@ -184,7 +210,8 @@
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;"
|
||||
overflow: hidden;
|
||||
"
|
||||
v-model:value="formData.examinationLimit"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px"
|
||||
@@ -241,7 +268,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">试题排列:</span>
|
||||
@@ -259,7 +285,7 @@
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item" style="height: 20px;"></div>
|
||||
<div class="main_item" style="height: 20px"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="contentMain">
|
||||
@@ -334,143 +360,153 @@ import {Form, message} from "ant-design-vue";
|
||||
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
taskList: []
|
||||
})
|
||||
const visible = ref(false)
|
||||
taskList: [],
|
||||
});
|
||||
const visible = ref(false);
|
||||
const initValue = {
|
||||
examinationName: '',
|
||||
examinationPaperId: '',
|
||||
examinationStartTime: '',
|
||||
examinationEndTime: '',
|
||||
examinationDuration: '',
|
||||
passLine: '',
|
||||
examinationName: "",
|
||||
examinationPaperId: "",
|
||||
examinationStartTime: "",
|
||||
examinationEndTime: "",
|
||||
examinationDuration: "",
|
||||
passLine: "",
|
||||
examType: 1,
|
||||
source: "",
|
||||
showAnswers: 2,
|
||||
showAnalysis: 2,
|
||||
scoringModel: 2,
|
||||
questionArrangement: 4,
|
||||
externalExplain: ""
|
||||
}
|
||||
const formData = ref(initValue)
|
||||
externalExplain: "",
|
||||
};
|
||||
const formData = ref(initValue);
|
||||
const innerRule = {
|
||||
examinationName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入考试名称',
|
||||
message: "请输入考试名称",
|
||||
},
|
||||
],
|
||||
examinationPaperId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入选择试卷',
|
||||
message: "请输入选择试卷",
|
||||
},
|
||||
],
|
||||
examinationStartTime: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入开始开始时间',
|
||||
message: "请输入开始开始时间",
|
||||
},
|
||||
],
|
||||
examinationEndTime: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入开始结束时间',
|
||||
message: "请输入开始结束时间",
|
||||
},
|
||||
],
|
||||
examinationDuration: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入考试时长',
|
||||
message: "请输入考试时长",
|
||||
},
|
||||
],
|
||||
passLine: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入及格线',
|
||||
message: "请输入及格线",
|
||||
},
|
||||
],
|
||||
}
|
||||
};
|
||||
const outerRule = {
|
||||
examinationName: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入考试名称',
|
||||
message: "请输入考试名称",
|
||||
},
|
||||
],
|
||||
source: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入数据来源',
|
||||
message: "请输入数据来源",
|
||||
},
|
||||
],
|
||||
}
|
||||
};
|
||||
const rulesRef = ref(innerRule);
|
||||
|
||||
const emit = defineEmits({})
|
||||
const emit = defineEmits({});
|
||||
const taskIndex = ref(-1);
|
||||
const dateTime = ref([]);
|
||||
|
||||
const { resetFields, validate } = Form.useForm(formData, rulesRef);
|
||||
|
||||
watch(() => formData.value.examType, () => {
|
||||
formData.value.examType === 1 ? rulesRef.value = innerRule : rulesRef.value = outerRule
|
||||
})
|
||||
watch(
|
||||
() => formData.value.examType,
|
||||
() => {
|
||||
formData.value.examType === 1
|
||||
? (rulesRef.value = innerRule)
|
||||
: (rulesRef.value = outerRule);
|
||||
}
|
||||
);
|
||||
|
||||
const closeDrawer = () => {
|
||||
visible.value = false
|
||||
taskIndex.value = -1
|
||||
resetFields()
|
||||
dateTime.value = []
|
||||
visible.value = false;
|
||||
taskIndex.value = -1;
|
||||
resetFields();
|
||||
dateTime.value = [];
|
||||
};
|
||||
|
||||
|
||||
function timeChange(time, timeStr) {
|
||||
formData.value.examinationStartTime = timeStr[0]
|
||||
formData.value.examinationEndTime = timeStr[1]
|
||||
formData.value.examinationStartTime = timeStr[0];
|
||||
formData.value.examinationEndTime = timeStr[1];
|
||||
}
|
||||
|
||||
const disabledDate = (current) => {
|
||||
return current && current < dayjs().startOf('day');
|
||||
return current && current < dayjs().startOf("day");
|
||||
};
|
||||
|
||||
|
||||
// 系统考试
|
||||
async function confirm() {
|
||||
await validate().catch(({ errorFields }) => {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
throw Error("数据校验不通过")
|
||||
throw Error("数据校验不通过");
|
||||
});
|
||||
if (taskIndex.value === -1) {
|
||||
const list = props.taskList
|
||||
list.push({name: formData.value.examinationName, type: props.type, info: {...formData.value}})
|
||||
const list = props.taskList;
|
||||
list.push({
|
||||
name: formData.value.examinationName,
|
||||
type: props.type,
|
||||
info: { ...formData.value },
|
||||
});
|
||||
} else {
|
||||
const data = props.taskList[taskIndex.value]
|
||||
data.name = formData.value.examinationName
|
||||
data.info = formData.value
|
||||
const data = props.taskList[taskIndex.value];
|
||||
data.name = formData.value.examinationName;
|
||||
data.info = formData.value;
|
||||
}
|
||||
emit('update:taskList', [...props.taskList])
|
||||
closeDrawer()
|
||||
emit("update:taskList", [...props.taskList]);
|
||||
closeDrawer();
|
||||
}
|
||||
|
||||
|
||||
function openDrawer(i, row) {
|
||||
row && resetFields(row.info);
|
||||
row && (dateTime.value = [row.info.examinationStartTime, row.info.examinationEndTime]);
|
||||
(i >= 0) && (taskIndex.value = i);
|
||||
visible.value = true
|
||||
row &&
|
||||
(dateTime.value = [
|
||||
row.info.examinationStartTime,
|
||||
row.info.examinationEndTime,
|
||||
]);
|
||||
i >= 0 && (taskIndex.value = i);
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
const delTag = () => {
|
||||
formData.value.examinationPaperId = '';
|
||||
formData.value.examinationTestName = '';
|
||||
}
|
||||
formData.value.examinationPaperId = "";
|
||||
formData.value.examinationTestName = "";
|
||||
};
|
||||
|
||||
function changeOuter(v) {
|
||||
formData.value.examType = v;
|
||||
}
|
||||
|
||||
defineExpose({openDrawer})
|
||||
defineExpose({ openDrawer });
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
@@ -610,7 +646,6 @@ defineExpose({openDrawer})
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
|
||||
.timerbox {
|
||||
margin-top: 6px;
|
||||
margin-right: 32px;
|
||||
|
||||
@@ -2,22 +2,33 @@
|
||||
<div @click="openDrawer">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<a-drawer :visible="visible" class="drawerStyle addonlineDrawer" width="800" title="选择测评"
|
||||
placement="right">
|
||||
<a-drawer
|
||||
:visible="visible"
|
||||
class="drawerStyle addonlineDrawer"
|
||||
width="800"
|
||||
title="选择测评"
|
||||
placement="right"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">选择测评</div>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"/>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="contentMain" v-if="data.length > 0">
|
||||
<div class="main_items">
|
||||
<div class="mi_ipts">
|
||||
<div class="mii_ipt">
|
||||
<div class="ipt_name"></div>
|
||||
<div class="fi_input">
|
||||
<a-input v-model:value="params.keyword" style="width: 424px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入测评名称"/>
|
||||
<a-input
|
||||
v-model:value="params.keyword"
|
||||
style="width: 424px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入测评名称"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,7 +47,9 @@
|
||||
<a-table
|
||||
:customRow="customRow"
|
||||
class="ant-table-striped"
|
||||
:row-class-name="(_, index) => (index % 2 === 1 ? 'table-striped' : null)"
|
||||
:row-class-name="
|
||||
(_, index) => (index % 2 === 1 ? 'table-striped' : null)
|
||||
"
|
||||
row-key="id"
|
||||
:columns="columns"
|
||||
:data-source="data"
|
||||
@@ -46,6 +59,83 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contentMain nolimits" v-else>
|
||||
<div class="limitstext1">
|
||||
抱歉,您没有关联测评的权限,您可以联系下方管理员开启权限
|
||||
</div>
|
||||
<div class="limitstext2">测评工具介绍</div>
|
||||
<div class="limitsRow">
|
||||
<div class="limitsRowDrop"></div>
|
||||
<div class="limitsRowText">
|
||||
人才发展项目中恰当运用测评手段可以更为精准地定位培训需求,更有针对性地设计培养项目和课程;同时,也能够帮助学员精准认知自身问题,提高在项目中的参与度。
|
||||
</div>
|
||||
</div>
|
||||
<div class="limitsRow" style="margin-top: 10px">
|
||||
<div class="limitsRowDrop"></div>
|
||||
<div class="limitsRowText">
|
||||
BOEU测评部经过多年的额实践,积累了一套覆盖“能力、性格和动力”三大方面的测评工具,可在人才发展项目中选择使用。
|
||||
</div>
|
||||
</div>
|
||||
<div class="tool" v-for="(item, key) in toolList" :key="key">
|
||||
<div
|
||||
class="toolName"
|
||||
:style="{
|
||||
backgroundColor:
|
||||
key === 0
|
||||
? 'rgba(0, 77, 126)'
|
||||
: key === 1
|
||||
? 'rgba(184, 0, 0)'
|
||||
: 'rgba(46, 129, 83)',
|
||||
}"
|
||||
>
|
||||
<div>{{ item.name[0] }}</div>
|
||||
<div>{{ item.name[1] }}</div>
|
||||
</div>
|
||||
<div class="toolEvery1" v-for="(i, k) in item.children" :key="k">
|
||||
<div
|
||||
class="toolEveryText1"
|
||||
:style="{
|
||||
color:
|
||||
key === 0
|
||||
? 'rgba(5,75,120)'
|
||||
: key === 1
|
||||
? 'rgba(169,3,3)'
|
||||
: 'rgba(44,120,79)',
|
||||
}"
|
||||
>
|
||||
{{ i.text1 }}
|
||||
</div>
|
||||
<div class="toolEveryText2">{{ i.text2 }}</div>
|
||||
<div
|
||||
class="toolEveryText3"
|
||||
v-if="i.text3"
|
||||
:style="{
|
||||
color:
|
||||
key === 0
|
||||
? 'rgba(5,75,120)'
|
||||
: key === 1
|
||||
? 'rgba(169,3,3)'
|
||||
: 'rgba(44,120,79)',
|
||||
}"
|
||||
>
|
||||
{{ i.text3 }}
|
||||
</div>
|
||||
<div class="toolEveryText4" v-if="i.text4">{{ i.text4 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="limitsRow">
|
||||
<div class="limitsRowDrop"></div>
|
||||
<div class="limitsRowText">
|
||||
如项目中有测评需求,请您联系BOEU测评部
|
||||
</div>
|
||||
</div>
|
||||
<div class="limitsRow">
|
||||
<div class="limitsRowDrop"></div>
|
||||
<div class="limitsRowText">
|
||||
联系人:王逸(10167304) 联系电话:010-60965646
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="confirm">确定</button>
|
||||
@@ -59,14 +149,78 @@ import {useBoeApiPage} from "@/api/request";
|
||||
import { TEST_PAGE } from "@/api/ThirdApi";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
const toolList = ref([
|
||||
{
|
||||
name: ["能力类", "测验工具"],
|
||||
children: [
|
||||
{
|
||||
text1: "职场准备度测评",
|
||||
text2: "无工作经验学生",
|
||||
text3: "职业能力成熟度测评",
|
||||
text4: "五年以内工龄员工",
|
||||
},
|
||||
{
|
||||
text1: "职业认知能力测评",
|
||||
text2: "五年内工龄员工",
|
||||
text3: "商业推荐测评",
|
||||
text4: "五年内工龄员工",
|
||||
},
|
||||
{
|
||||
text1: "沟通能力测评",
|
||||
text2: "五年内工龄员工",
|
||||
text3: "情商测评",
|
||||
text4: "各层级人员",
|
||||
},
|
||||
{
|
||||
text1: "管理行为自检问卷",
|
||||
text2: "基/中/高层管理者",
|
||||
text3: "管理者情境判断测评",
|
||||
text4: "基/中高层管理者",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: ["性格/风格", "测验工具"],
|
||||
children: [
|
||||
{
|
||||
text1: "PDP性格类型测验",
|
||||
text2: "各层级人员",
|
||||
},
|
||||
{
|
||||
text1: "RTC综合评估",
|
||||
text2: "各层级人员",
|
||||
},
|
||||
{
|
||||
text1: "大五职业性格测评",
|
||||
text2: "各层级人员",
|
||||
},
|
||||
{
|
||||
text1: "领导风格测验",
|
||||
text2: "各层级人员",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: ["动机/价值观", "测验工具"],
|
||||
children: [
|
||||
{
|
||||
text1: "动机测验(内隐&外显)",
|
||||
text2: "各层级人员",
|
||||
},
|
||||
{
|
||||
text1: "职业兴趣测验",
|
||||
text2: "各层级人员",
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
const props = defineProps({
|
||||
taskList: [],
|
||||
evaluationTypeId: String,
|
||||
evaluationTypeName: Number
|
||||
})
|
||||
const visible = ref(false)
|
||||
const emit = defineEmits({})
|
||||
evaluationTypeName: Number,
|
||||
});
|
||||
const visible = ref(false);
|
||||
const emit = defineEmits({});
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
@@ -100,18 +254,18 @@ const columns = ref([
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
},
|
||||
])
|
||||
]);
|
||||
|
||||
const store = useStore();
|
||||
|
||||
const initParams = {
|
||||
keyword: '',
|
||||
keyword: "",
|
||||
page: 1,
|
||||
size: 10,
|
||||
user_id: store.state.userInfo.id
|
||||
user_id: store.state.userInfo.id,
|
||||
// orderAsc: true
|
||||
}
|
||||
const params = ref(initParams)
|
||||
};
|
||||
const params = ref(initParams);
|
||||
|
||||
const rowSelectKeys = ref([]);
|
||||
const selectsData = ref([]);
|
||||
@@ -119,31 +273,35 @@ const taskIndex = ref(-1);
|
||||
|
||||
const { data, loading, total, fetch } = useBoeApiPage(TEST_PAGE, params.value, {
|
||||
init: false,
|
||||
result: res => {
|
||||
let newArr = []
|
||||
result: (res) => {
|
||||
console.log("获取测评", res);
|
||||
let newArr = [];
|
||||
for (let i = 0; i < res.result.data.length; i++) {
|
||||
res.result.data[i].id = res.result.data[i].quiz_kid;
|
||||
newArr.push(res.result.data[i])
|
||||
newArr.push(res.result.data[i]);
|
||||
}
|
||||
return newArr
|
||||
return newArr;
|
||||
},
|
||||
totalPage: res => res.result.total_page_num,
|
||||
total: res => res.result.count
|
||||
})
|
||||
console.log(data, 222)
|
||||
totalPage: (res) => res.result.total_page_num,
|
||||
total: (res) => res.result.count,
|
||||
});
|
||||
|
||||
watch(taskIndex, () => {
|
||||
if (taskIndex.value >= 0) {
|
||||
rowSelectKeys.value = [props.taskList[taskIndex.value].courseId]
|
||||
selectsData.value = data.value.find(t => t.id === props.taskList[taskIndex.value].courseId) || {}
|
||||
rowSelectKeys.value = [props.taskList[taskIndex.value].courseId];
|
||||
selectsData.value =
|
||||
data.value.find(
|
||||
(t) => t.id === props.taskList[taskIndex.value].courseId
|
||||
) || {};
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
const customRow = (record) => ({
|
||||
onClick: () => {
|
||||
rowSelectKeys.value = [record.id]
|
||||
selectsData.value = [record]
|
||||
}
|
||||
})
|
||||
rowSelectKeys.value = [record.id];
|
||||
selectsData.value = [record];
|
||||
},
|
||||
});
|
||||
|
||||
const pagination = computed(() => ({
|
||||
total: total.value,
|
||||
@@ -155,20 +313,20 @@ const pagination = computed(() => ({
|
||||
|
||||
const changePagination = (e) => {
|
||||
params.value.pageIndex = e;
|
||||
fetch()
|
||||
fetch();
|
||||
};
|
||||
const rowSelection = computed(() => ({
|
||||
type: 'radio',
|
||||
type: "radio",
|
||||
columnWidth: 20,
|
||||
selectedRowKeys: rowSelectKeys.value,
|
||||
onChange: onSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
getCheckboxProps: getCheckboxProps
|
||||
getCheckboxProps: getCheckboxProps,
|
||||
}));
|
||||
const getCheckboxProps = () => ({
|
||||
// 某几项默认禁止选中(R: 当state等于1时)
|
||||
disabled: false
|
||||
})
|
||||
disabled: false,
|
||||
});
|
||||
|
||||
function onSelectChange(e, l) {
|
||||
rowSelectKeys.value = e;
|
||||
@@ -176,28 +334,28 @@ function onSelectChange(e, l) {
|
||||
}
|
||||
|
||||
function search() {
|
||||
params.value.pageIndex = 1
|
||||
fetch()
|
||||
params.value.pageIndex = 1;
|
||||
fetch();
|
||||
}
|
||||
|
||||
function reset() {
|
||||
rowSelectKeys.value = [];
|
||||
selectsData.value = [];
|
||||
params.value.pageIndex = 1
|
||||
params.value.keyWord = ''
|
||||
fetch()
|
||||
params.value.pageIndex = 1;
|
||||
params.value.keyWord = "";
|
||||
fetch();
|
||||
}
|
||||
|
||||
const closeDrawer = () => {
|
||||
visible.value = false
|
||||
taskIndex.value = -1
|
||||
reset()
|
||||
visible.value = false;
|
||||
taskIndex.value = -1;
|
||||
reset();
|
||||
};
|
||||
|
||||
function confirm() {
|
||||
if (!selectsData.value.length || !rowSelectKeys.value.length) {
|
||||
message.warning("请选择测评!");
|
||||
return
|
||||
return;
|
||||
}
|
||||
// if (taskIndex.value === -1) {
|
||||
// let list = props.taskList
|
||||
@@ -220,18 +378,17 @@ function confirm() {
|
||||
// if(props.taskList!=undefined){
|
||||
// emit('update:taskList', [...props.taskList])
|
||||
// }
|
||||
emit('update:evaluationTypeId', selectsData.value[0].id)
|
||||
emit('update:evaluationTypeName', selectsData.value[0].title)
|
||||
closeDrawer()
|
||||
emit("update:evaluationTypeId", selectsData.value[0].id);
|
||||
emit("update:evaluationTypeName", selectsData.value[0].title);
|
||||
closeDrawer();
|
||||
}
|
||||
|
||||
function openDrawer(i) {
|
||||
(i >= 0) && (taskIndex.value = i)
|
||||
visible.value = true
|
||||
i >= 0 && (taskIndex.value = i);
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
defineExpose({openDrawer})
|
||||
|
||||
defineExpose({ openDrawer });
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
@@ -417,7 +574,9 @@ defineExpose({openDrawer})
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
|
||||
@@ -431,6 +590,76 @@ defineExpose({openDrawer})
|
||||
}
|
||||
}
|
||||
}
|
||||
.nolimits {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
.limitstext1 {
|
||||
margin-top: 30px;
|
||||
font-size: 23px;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
}
|
||||
.limitstext2 {
|
||||
margin-top: 30px;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
font-weight: 800;
|
||||
}
|
||||
.limitsRow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
.limitsRowDrop {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: #333333;
|
||||
border-radius: 4px;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.limitsRowText {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
font-weight: 400;
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
.tool {
|
||||
width: 100%;
|
||||
border-bottom: 1px dashed rgba(0, 78, 126);
|
||||
display: flex;
|
||||
margin-top: 30px;
|
||||
align-items: center;
|
||||
padding-bottom: 30px;
|
||||
.toolName {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
|
||||
border-radius: 5px;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.toolEvery1 {
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
color: rgba(71, 74, 76);
|
||||
margin-right: 12px;
|
||||
line-height: 26px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main_btns {
|
||||
height: 72px;
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
<!--
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2023-02-23 10:53:15
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-02-23 20:28:28
|
||||
* @FilePath: /fe-manage/src/components/project/OrgClass.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<a-tree-select
|
||||
:getPopupContainer="
|
||||
@@ -79,6 +87,7 @@ function change(
|
||||
},
|
||||
}
|
||||
) {
|
||||
console.log("label2222", label, namePath, value);
|
||||
emit("update:name", label);
|
||||
emit("update:fullName", namePath);
|
||||
emit("update:value", value);
|
||||
|
||||
101
src/components/project/OrgClassCheck.vue
Normal file
101
src/components/project/OrgClassCheck.vue
Normal file
@@ -0,0 +1,101 @@
|
||||
<!--
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2023-02-23 14:57:21
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-02-23 20:42:25
|
||||
* @FilePath: /fe-manage/src/components/project/OrgClassCheck.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<a-tree-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
"
|
||||
v-model:value="labelValue"
|
||||
style="width: 440px; min-height: 40px"
|
||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||
placeholder="请选择归属组织"
|
||||
:labelInValue="true"
|
||||
allow-clear
|
||||
v-model:treeExpandedKeys="stuTreeExpandedKeys"
|
||||
:loading="orgLoading"
|
||||
:load-data="onLoadData"
|
||||
:tree-data="options"
|
||||
:fieldNames="{
|
||||
children: 'treeChildList',
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
}"
|
||||
:disabled="disabled"
|
||||
@change="change"
|
||||
dropdownClassName="treeDropdown"
|
||||
multiple
|
||||
>
|
||||
</a-tree-select>
|
||||
</template>
|
||||
<script setup>
|
||||
import { defineEmits, defineProps, ref, watch } from "vue";
|
||||
import { boeRequest, useBoeApi } from "@/api/request";
|
||||
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/ThirdApi";
|
||||
|
||||
const props = defineProps({
|
||||
value: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
name: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits({});
|
||||
const stuTreeExpandedKeys = ref([]);
|
||||
const labelValue = ref([]);
|
||||
const { data: options, loading: orgLoading } = useBoeApi(
|
||||
ORG_LIST,
|
||||
{ keyword: "" },
|
||||
{
|
||||
init: true,
|
||||
result: (res) => res.result.map((e) => ({ ...e, isLeaf: false })),
|
||||
}
|
||||
);
|
||||
|
||||
watch(props, () => {
|
||||
stuTreeExpandedKeys.value = [];
|
||||
console.log("labelValue.value", labelValue.value, props.value);
|
||||
labelValue.value = props.value;
|
||||
// if (labelValue.value.value !== props.value) {
|
||||
// labelValue.value = { value: props.value, label: props.name };
|
||||
// }
|
||||
// if (labelValue.value.label !== props.name) {
|
||||
// labelValue.value = { value: props.value, label: props.name };
|
||||
// }
|
||||
});
|
||||
|
||||
function onLoadData(treeNode) {
|
||||
return boeRequest(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then(
|
||||
(r) => {
|
||||
treeNode.dataRef.treeChildList = r.result.directChildList;
|
||||
options.value = [...options.value];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function change(e) {
|
||||
// console.log("label", e, emit);
|
||||
// let label = [];
|
||||
// let value = [];
|
||||
// for (let i = 0; i < e.length; i++) {
|
||||
// label.push(e[i].label);
|
||||
// value.push(e[i].value);
|
||||
// }
|
||||
// emit("update:name", label);
|
||||
emit("update:value", e);
|
||||
}
|
||||
</script>
|
||||
@@ -318,33 +318,84 @@
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space>
|
||||
<a-button v-if="(record.status===0 || record.status===-1 || !record.kkty) && checkPer(record.permissions)"
|
||||
@click="() => handleEdit(record, String(record.courseform))" type="link">编辑
|
||||
<a-button
|
||||
v-if="
|
||||
(record.status === 0 ||
|
||||
record.status === -1 ||
|
||||
!record.kkty) &&
|
||||
checkPer(record.permissions)
|
||||
"
|
||||
@click="() => handleEdit(record, String(record.courseform))"
|
||||
type="link"
|
||||
>编辑
|
||||
</a-button>
|
||||
<a-button v-if="record.status===2 && checkPer(record.permissions)"
|
||||
@click="() => handleStart(record, String(record.courseform))" type="link">开课
|
||||
<a-button
|
||||
v-if="record.status === 2 && checkPer(record.permissions)"
|
||||
@click="() => handleStart(record, String(record.courseform))"
|
||||
type="link"
|
||||
>开课
|
||||
</a-button>
|
||||
<a-button v-if="record.status===2 && checkPer(record.permissions)"
|
||||
@click="() => handleLook(record, String(record.courseform))" type="link">查看
|
||||
<a-button
|
||||
v-if="record.status === 2 && checkPer(record.permissions)"
|
||||
@click="() => handleLook(record, String(record.courseform))"
|
||||
type="link"
|
||||
>查看
|
||||
</a-button>
|
||||
<a-button v-if="record.status===2 && checkPer(record.permissions)"
|
||||
@click="() => handleGuan22(record, String(record.courseform))" type="link">管理
|
||||
<a-button
|
||||
v-if="record.status === 2 && checkPer(record.permissions)"
|
||||
@click="() => handleGuan22(record, String(record.courseform))"
|
||||
type="link"
|
||||
>管理
|
||||
</a-button>
|
||||
<DropDown v-if="checkPer(record.permissions)" value="授权">
|
||||
<OwnerTableModelStudent :types="[10,11,12]" :id="record.offcourseId">权限名单</OwnerTableModelStudent>
|
||||
<CommonStudent :type="10" :id="record.offcourseId" title="查看权">查看权</CommonStudent>
|
||||
<CommonStudent :type="11" :id="record.offcourseId" title="管理权">管理权</CommonStudent>
|
||||
<OwnerTableModelStudent
|
||||
:types="[10, 11, 12]"
|
||||
:id="record.offcourseId"
|
||||
>权限名单</OwnerTableModelStudent
|
||||
>
|
||||
<CommonStudent
|
||||
:type="10"
|
||||
:id="record.offcourseId"
|
||||
title="查看权"
|
||||
>查看权</CommonStudent
|
||||
>
|
||||
<CommonStudent
|
||||
:type="11"
|
||||
:id="record.offcourseId"
|
||||
title="管理权"
|
||||
>管理权</CommonStudent
|
||||
>
|
||||
</DropDown>
|
||||
<DropDown v-if="checkPer(record.permissions)" value="更多">
|
||||
<a-button @click="() => handleCopy(record, String(record.courseform))" type="link">复制</a-button>
|
||||
<a-button @click="() => handleRejectExit(record, String(record.courseform))" type="link">撤回</a-button>
|
||||
<a-button v-if="record.status===2 && record.kkty"
|
||||
@click="() => handleStop(record, String(record.courseform))" type="link">停用
|
||||
<a-button
|
||||
@click="() => handleCopy(record, String(record.courseform))"
|
||||
type="link"
|
||||
>复制</a-button
|
||||
>
|
||||
<a-button
|
||||
@click="
|
||||
() => handleRejectExit(record, String(record.courseform))
|
||||
"
|
||||
type="link"
|
||||
>撤回</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.status === 2 && record.kkty"
|
||||
@click="() => handleStop(record, String(record.courseform))"
|
||||
type="link"
|
||||
>停用
|
||||
</a-button>
|
||||
<a-button v-if="record.status===2 && !record.kkty"
|
||||
@click="() => handleOpen(record, String(record.courseform))" type="link">启用
|
||||
<a-button
|
||||
v-if="record.status === 2 && !record.kkty"
|
||||
@click="() => handleOpen(record, String(record.courseform))"
|
||||
type="link"
|
||||
>启用
|
||||
</a-button>
|
||||
<a-button @click="() => handleDelete(record, String(record.courseform))" type="link" danger>删除
|
||||
<a-button
|
||||
@click="() => handleDelete(record, String(record.courseform))"
|
||||
type="link"
|
||||
danger
|
||||
>删除
|
||||
</a-button>
|
||||
</DropDown>
|
||||
</a-space>
|
||||
@@ -807,7 +858,7 @@
|
||||
</div>
|
||||
</a-modal>
|
||||
<!--开课页面 -->
|
||||
<!--新建开课页面 -->
|
||||
<!--新建开课页面 cstm_hs -->
|
||||
<a-modal
|
||||
v-model:visible="cstm_hs"
|
||||
style="margin-top: 400px"
|
||||
@@ -841,7 +892,11 @@
|
||||
<div class="b_input">
|
||||
<NameInput
|
||||
maxlength="30"
|
||||
v-model:value="xjkkinputV1" v-model:validate="validate" show-count :id="offcourseId" :type="2"
|
||||
v-model:value="xjkkinputV1"
|
||||
v-model:validate="validate"
|
||||
show-count
|
||||
:id="offcourseId"
|
||||
:type="2"
|
||||
style="width: 440px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入开课名称"
|
||||
></NameInput>
|
||||
@@ -910,6 +965,48 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cstm_items">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">考勤设置:</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="margin-right: 10px">签到</div>
|
||||
<div
|
||||
style="display: flex; align-items: center; margin-right: 20px"
|
||||
>
|
||||
<span>开始前:</span>
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
"
|
||||
v-model:value="beforeValue"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<span>开始后:</span>
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
"
|
||||
v-model:value="afterStartValue"
|
||||
></a-input-number>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cstm_items">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">报名设置</span>
|
||||
@@ -953,8 +1050,17 @@
|
||||
<div v-if="checked4" class="cstm_items main_item">
|
||||
<div class="signbox"></div>
|
||||
<div class="btnbox">
|
||||
<AssessmentList v-model:assessmentName="assessmentName" v-model:assessmentId="assessmentId">
|
||||
<button class="xkbtn" @click="showAssessment" style="margin-bottom: 0;margin-top: 0">选择评估</button>
|
||||
<AssessmentList
|
||||
v-model:assessmentName="assessmentName"
|
||||
v-model:assessmentId="assessmentId"
|
||||
>
|
||||
<button
|
||||
class="xkbtn"
|
||||
@click="showAssessment"
|
||||
style="margin-bottom: 0; margin-top: 0"
|
||||
>
|
||||
选择评估
|
||||
</button>
|
||||
</AssessmentList>
|
||||
<div v-if="assessmentId > 0">
|
||||
<a-tag closable @close="removePG" color="processing">
|
||||
@@ -987,7 +1093,9 @@
|
||||
<div class="signbox"></div>
|
||||
<div class="btnbox">
|
||||
<add-test v-model:info="examInfo">
|
||||
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">配置考试</button>
|
||||
<button class="xkbtn" style="margin-bottom: 0; margin-top: 0">
|
||||
配置考试
|
||||
</button>
|
||||
</add-test>
|
||||
<div v-if="examInfo.examinationName">
|
||||
<a-tag closable @close="logT" color="processing">
|
||||
@@ -996,7 +1104,6 @@
|
||||
</span>
|
||||
</a-tag>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
@@ -1107,14 +1214,41 @@
|
||||
:isgetStudent="isgetStudent"
|
||||
>
|
||||
<template #extension="{ data: { record } }">
|
||||
<a-button v-if="record.source === 4 && record.status === 1"
|
||||
@click="() => {record.status = 0;auditStudent(record);}" type="link">审核通过
|
||||
<a-button
|
||||
v-if="record.source === 4 && record.status === 1"
|
||||
@click="
|
||||
() => {
|
||||
record.status = 0;
|
||||
auditStudent(record);
|
||||
}
|
||||
"
|
||||
type="link"
|
||||
>审核通过
|
||||
</a-button>
|
||||
<a-button v-if="record.source === 4 && record.status === 1"
|
||||
@click="() => {record.status = 2;auditStudent(record);}" type="link">拒绝
|
||||
<a-button
|
||||
v-if="record.source === 4 && record.status === 1"
|
||||
@click="
|
||||
() => {
|
||||
record.status = 2;
|
||||
auditStudent(record);
|
||||
}
|
||||
"
|
||||
type="link"
|
||||
>拒绝
|
||||
</a-button>
|
||||
<a-button v-if="record.source === 4 && (record.status === 0 || record.status === 2)"
|
||||
@click="() => {record.status = 1;auditStudent(record);}" type="link">撤回
|
||||
<a-button
|
||||
v-if="
|
||||
record.source === 4 &&
|
||||
(record.status === 0 || record.status === 2)
|
||||
"
|
||||
@click="
|
||||
() => {
|
||||
record.status = 1;
|
||||
auditStudent(record);
|
||||
}
|
||||
"
|
||||
type="link"
|
||||
>撤回
|
||||
</a-button>
|
||||
</template>
|
||||
</TableStudent>
|
||||
@@ -1515,7 +1649,8 @@ import {
|
||||
studentExport,
|
||||
handleStudent,
|
||||
getMemberInfoApi,
|
||||
copyCoursePlan, copyCourse,
|
||||
copyCoursePlan,
|
||||
copyCourse,
|
||||
} from "@/api/indexCourse";
|
||||
import {
|
||||
traverseArr,
|
||||
@@ -1549,6 +1684,13 @@ import dayjs from "dayjs";
|
||||
|
||||
//列表表格
|
||||
const columns1 = [
|
||||
{
|
||||
title: "课程编号",
|
||||
width: 130,
|
||||
dataIndex: "offcourseNumber",
|
||||
key: "offcourseNumber",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
width: 400,
|
||||
@@ -1560,13 +1702,7 @@ const columns1 = [
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "课程编号",
|
||||
width: 130,
|
||||
dataIndex: "offcourseNumber",
|
||||
key: "offcourseNumber",
|
||||
align: "center",
|
||||
},
|
||||
|
||||
{
|
||||
title: "内容分类",
|
||||
width: 130,
|
||||
@@ -1645,16 +1781,16 @@ const columns1 = [
|
||||
return text ? text : "0";
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: "评分",
|
||||
// width: 130,
|
||||
// dataIndex: "grade",
|
||||
// key: "5",
|
||||
// align: "center",
|
||||
// customRender: ({ text }) => {
|
||||
// return text ? text : "0";
|
||||
// },
|
||||
// },
|
||||
{
|
||||
title: "评分",
|
||||
width: 130,
|
||||
dataIndex: "score",
|
||||
key: "5",
|
||||
align: "center",
|
||||
customRender: ({ text }) => {
|
||||
return text ? text : "0";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
width: 130,
|
||||
@@ -2443,7 +2579,7 @@ export default defineComponent({
|
||||
ft_1: false,
|
||||
om_ckxq: false,
|
||||
stm_hs: false,
|
||||
cstm_hs: false,
|
||||
cstm_hs: true,
|
||||
sm_hs: false,
|
||||
QR_hs: false,
|
||||
closableQR: false,
|
||||
@@ -2524,6 +2660,8 @@ export default defineComponent({
|
||||
xjkkinputV2: "",
|
||||
xjkkinputV3: "",
|
||||
xjkkinputV4: null,
|
||||
beforeValue: null,
|
||||
afterStartValue: null,
|
||||
//开课学员管理
|
||||
xygl_inputV1: "",
|
||||
//录入成绩
|
||||
@@ -2981,6 +3119,7 @@ export default defineComponent({
|
||||
pubtime: "publishTime",
|
||||
kkty: "status",
|
||||
offcourseId: "offcourseId",
|
||||
score: "score",
|
||||
},
|
||||
true
|
||||
);
|
||||
@@ -2999,7 +3138,8 @@ export default defineComponent({
|
||||
return (
|
||||
(list &&
|
||||
list.length > 0 &&
|
||||
list.map((e) =>
|
||||
list
|
||||
.map((e) =>
|
||||
classify == e.code
|
||||
? name
|
||||
? name + "-" + e.name
|
||||
@@ -3179,10 +3319,10 @@ export default defineComponent({
|
||||
state.addtestvisible = true;
|
||||
};
|
||||
const logW = () => {
|
||||
state.workInfo = {}
|
||||
state.workInfo = {};
|
||||
};
|
||||
const logT = () => {
|
||||
state.examInfo = {}
|
||||
state.examInfo = {};
|
||||
};
|
||||
const removePG = () => {
|
||||
console.log("11111");
|
||||
@@ -3359,12 +3499,12 @@ export default defineComponent({
|
||||
if (state.selectTime) {
|
||||
// beginTime = parseInt(new Date(state.selectTime[0].$d).getTime() / 1000);
|
||||
// endTime = parseInt(new Date(state.selectTime[1].$d).getTime() / 1000);
|
||||
beginTime = dayjs(state.selectTime[0]).format('YYYY-MM-DD HH:mm:ss')
|
||||
beginTime = dayjs(state.selectTime[0]).format("YYYY-MM-DD HH:mm:ss");
|
||||
// toDate(
|
||||
// new Date(state.selectTime[0].$d).getTime() / 1000,
|
||||
// "Y-M-D h:m:s"
|
||||
// );
|
||||
endTime = dayjs(state.selectTime[1]).format('YYYY-MM-DD HH:mm:ss')
|
||||
endTime = dayjs(state.selectTime[1]).format("YYYY-MM-DD HH:mm:ss");
|
||||
// toDate(
|
||||
// new Date(state.selectTime[1].$d).getTime() / 1000,
|
||||
// "Y-M-D h:m:s"
|
||||
@@ -3545,7 +3685,6 @@ export default defineComponent({
|
||||
state.of_hs = false;
|
||||
// state.ft_hs = true;
|
||||
CourseModalRef.value.visibleOpen(null, state.xzinputV1);
|
||||
|
||||
state.valueE1 = "";
|
||||
state.teacher = "";
|
||||
state.teacherName = "";
|
||||
@@ -3641,7 +3780,8 @@ export default defineComponent({
|
||||
state.assessmentId = null;
|
||||
state.assessmentName = "";
|
||||
state.EditWorkId = null;
|
||||
|
||||
state.beforeValue = null;
|
||||
state.afterStartValue = null;
|
||||
removePG();
|
||||
};
|
||||
//保存开课
|
||||
@@ -3650,14 +3790,18 @@ export default defineComponent({
|
||||
let startTime,
|
||||
endTime = 0;
|
||||
if (state.xjkkinputV3) {
|
||||
startTime = dayjs(state.xjkkinputV3[0]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000);
|
||||
endTime = dayjs(state.xjkkinputV3[1]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000);
|
||||
startTime = dayjs(state.xjkkinputV3[0]).format("YYYY-MM-DD HH:mm"); //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000);
|
||||
endTime = dayjs(state.xjkkinputV3[1]).format("YYYY-MM-DD HH:mm"); //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000);
|
||||
}
|
||||
const offName = await validateName({ name: state.xjkkinputV1, type: 5 ,id:state.offcoursePlanId}).then(res => {
|
||||
const offName = await validateName({
|
||||
name: state.xjkkinputV1,
|
||||
type: 5,
|
||||
id: state.offcoursePlanId,
|
||||
}).then((res) => {
|
||||
console.log(res, res.data.data);
|
||||
return res.data.data === 1;
|
||||
});
|
||||
console.log('校验重复',offName)
|
||||
console.log("校验重复", offName);
|
||||
if (offName) {
|
||||
message.destroy();
|
||||
return message.warning("开课名称重复,请重新填写");
|
||||
@@ -3684,7 +3828,9 @@ export default defineComponent({
|
||||
teacherId: state.member.value,
|
||||
teacher: state.member.name,
|
||||
workInfo: state.workInfo, //提交的作业信息
|
||||
examInfo: state.examInfo//提交的考试信息
|
||||
examInfo: state.examInfo, //提交的考试信息
|
||||
beforeValue: state.beforeValue, //考勤 开始前
|
||||
afterStartValue: state.afterStartValue, //考勤 开始后
|
||||
};
|
||||
console.log(postData);
|
||||
const checkList = [
|
||||
@@ -3715,10 +3861,14 @@ export default defineComponent({
|
||||
state.offcoursePlanId = item.id;
|
||||
|
||||
if (item.homeWorkId) {
|
||||
queryWorkDetailById({workId: item.homeWorkId}).then((res) => state.workInfo = res.data.data);
|
||||
queryWorkDetailById({ workId: item.homeWorkId }).then(
|
||||
(res) => (state.workInfo = res.data.data)
|
||||
);
|
||||
}
|
||||
if (item.testId) {
|
||||
queryExaminationDetailById({examinationId: item.testId}).then((res) => state.examInfo = res.data.data);
|
||||
queryExaminationDetailById({ examinationId: item.testId }).then(
|
||||
(res) => (state.examInfo = res.data.data)
|
||||
);
|
||||
}
|
||||
|
||||
console.log("获取面授课开课详情", item);
|
||||
@@ -3993,14 +4143,14 @@ export default defineComponent({
|
||||
message.success("复制成功");
|
||||
delete_exit1();
|
||||
rest();
|
||||
await copyCoursePlan({offcoursePlanId: state.offcoursePlanId})
|
||||
await copyCoursePlan({ offcoursePlanId: state.offcoursePlanId });
|
||||
getTableDate3();
|
||||
} else if (state.offcourseId) {
|
||||
delete_exit1();
|
||||
rest();
|
||||
message.success("复制成功");
|
||||
state.tableLoading = true;
|
||||
await copyCourse({courseId: state.offcourseId})
|
||||
await copyCourse({ courseId: state.offcourseId });
|
||||
getTableDate();
|
||||
}
|
||||
}
|
||||
@@ -4038,7 +4188,7 @@ export default defineComponent({
|
||||
};
|
||||
|
||||
const openMessage = () => {
|
||||
console.log(122222)
|
||||
console.log(122222);
|
||||
let startTime = "";
|
||||
let endTime = "";
|
||||
if (state.projectTime) {
|
||||
@@ -4047,7 +4197,7 @@ export default defineComponent({
|
||||
);
|
||||
endTime = parseInt(new Date(state.projectTime[1].$d).getTime() / 1000);
|
||||
}
|
||||
console.log(startTime, endTime)
|
||||
console.log(startTime, endTime);
|
||||
|
||||
// list({
|
||||
// pageNo: 1,
|
||||
@@ -4662,7 +4812,9 @@ export default defineComponent({
|
||||
name: record.name ? record.name : "",
|
||||
url:
|
||||
type == 1
|
||||
? window.location.protocol + process.env.VUE_APP_COURSE_STUDY + record.offcourseId
|
||||
? window.location.protocol +
|
||||
process.env.VUE_APP_COURSE_STUDY +
|
||||
record.offcourseId
|
||||
: process.env.VUE_APP_BASE_API +
|
||||
`/admin/student/studentSign?taskId=${
|
||||
record.id
|
||||
@@ -6550,7 +6702,9 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> tr:hover:not(.ant-table-expanded-row):not(
|
||||
.ant-table-row-selected
|
||||
)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
@@ -6851,7 +7005,9 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> tr:hover:not(.ant-table-expanded-row):not(
|
||||
.ant-table-row-selected
|
||||
)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
@@ -6976,7 +7132,9 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> tr:hover:not(.ant-table-expanded-row):not(
|
||||
.ant-table-row-selected
|
||||
)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,30 @@
|
||||
<!-- 确定新建面授课弹窗 -->
|
||||
<template>
|
||||
<a-modal v-model:visible="ft_hs" title="Title" :footer="null" :closable="false"
|
||||
wrapClassName="modalStyle facteachModal" width="80%" @cancel="visibleClose" @ok="handlePush">
|
||||
<a-modal
|
||||
v-model:visible="ft_hs"
|
||||
title="Title"
|
||||
:footer="null"
|
||||
:closable="false"
|
||||
wrapClassName="modalStyle facteachModal coursemodal"
|
||||
width="80%"
|
||||
@cancel="visibleClose"
|
||||
@ok="handlePush"
|
||||
>
|
||||
<div class="modalHeader">
|
||||
<div class="headerLeft">
|
||||
<img style="width: 17px; height: 18px; margin-right: 8px" src="@/assets/images/basicinfo/add.png" />
|
||||
<img
|
||||
style="width: 17px; height: 18px; margin-right: 8px"
|
||||
src="@/assets/images/basicinfo/add.png"
|
||||
/>
|
||||
<span v-if="ft_eidt" class="headerLeftText">编辑面授课</span>
|
||||
<span v-else class="headerLeftText">新建面授课</span>
|
||||
</div>
|
||||
<div style="margin-right: 57px; cursor: pointer">
|
||||
<img @click="noEditClose" style="width: 22px; height: 22px" src="@/assets/images/basicinfo/close22.png" />
|
||||
<img
|
||||
@click="noEditClose"
|
||||
style="width: 22px; height: 22px"
|
||||
src="@/assets/images/basicinfo/close22.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modalMain">
|
||||
@@ -26,14 +41,25 @@
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<div class="asterisk_icon">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="asterisk" />
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt="asterisk"
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">课程名称</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="i1_input">
|
||||
<NameInput ref="inputRef" placeholder="请输入课程名称" v-model:value="qdms_inputV1"
|
||||
v-model:validate="validate" :maxlength="20" show-count :type="2" :id="offcourseId"></NameInput>
|
||||
<NameInput
|
||||
ref="inputRef"
|
||||
placeholder="请输入课程名称"
|
||||
v-model:value="qdms_inputV1"
|
||||
v-model:validate="validate"
|
||||
:maxlength="20"
|
||||
show-count
|
||||
:type="2"
|
||||
:id="offcourseId"
|
||||
></NameInput>
|
||||
<!-- <a-input-->
|
||||
<!-- v-model:value="qdms_inputV1"-->
|
||||
<!-- maxlength="90"-->
|
||||
@@ -53,17 +79,30 @@
|
||||
<div class="i2_left">
|
||||
<span style="color: #999ba3">课程命名规则</span>
|
||||
</div>
|
||||
<div class="i2_right" @click="hideShow" style="cursor: pointer">
|
||||
<div class="b_zk" :style="{ display: hideshow ? 'block' : 'none' }">
|
||||
<div
|
||||
class="i2_right"
|
||||
@click="hideShow"
|
||||
style="cursor: pointer"
|
||||
>
|
||||
<div
|
||||
class="b_zk"
|
||||
:style="{ display: hideshow ? 'block' : 'none' }"
|
||||
>
|
||||
<span style="color: #4ea6ff">收起</span>
|
||||
</div>
|
||||
<div class="b_sq" :style="{ display: hideshow ? 'none' : 'block' }">
|
||||
<div
|
||||
class="b_sq"
|
||||
:style="{ display: hideshow ? 'none' : 'block' }"
|
||||
>
|
||||
<span style="color: #4ea6ff">展开</span>
|
||||
</div>
|
||||
<div class="b_icon"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="i2_detail" :style="{ display: hideshow ? 'block' : 'none' }">
|
||||
<div
|
||||
class="i2_detail"
|
||||
:style="{ display: hideshow ? 'block' : 'none' }"
|
||||
>
|
||||
<span style="color: #999ba3">
|
||||
1、课程名称统一不加书名号。<br />
|
||||
2、项目名称、属地等信息如需体现在课程名称中,请放在课程名称信息
|
||||
@@ -75,56 +114,118 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mbl_items2">
|
||||
<div class="item_nam" style="margin-top: 8px;">
|
||||
<div class="item_nam" style="margin-top: 8px">
|
||||
<div class="asterisk_icon">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">封面图</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div style="width:440px;height:70px;display: flex;justify-content: flex-start;align-items: center;">
|
||||
<img v-for="(item, index) in optionsUrl" :key="index" class="choiceoptionurl"
|
||||
:style="item.value == feng_mian_1 ? 'border:3px solid rgb(78, 166, 255);' : ''" :src="item.value"
|
||||
:alt="item.name" @click="choicePic(item.value)" />
|
||||
</div>
|
||||
<!-- <a-select
|
||||
:getPopupContainer="
|
||||
(triggerNode) => {
|
||||
return triggerNode.parentNode || document.body;
|
||||
}
|
||||
<div
|
||||
style="
|
||||
width: 440px;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
"
|
||||
v-model:value="feng_mian_1"
|
||||
dropdownClassName="dropdown-style"
|
||||
style="width: 440px"
|
||||
placeholder="请选择"
|
||||
:options="optionsUrl"
|
||||
allowClear
|
||||
showSearch
|
||||
/> -->
|
||||
<img class="i_upload_img" v-if="feng_mian_1" :src="feng_mian_1"
|
||||
style="width:220px;height:120px;border-radius: 8px;" alt="avatar" />
|
||||
>
|
||||
<img
|
||||
v-for="(item, index) in optionsUrl"
|
||||
:key="index"
|
||||
class="choiceoptionurl"
|
||||
:style="{
|
||||
border:
|
||||
pathBgId === item.id
|
||||
? '3px solid rgba(78, 166, 255, 1)'
|
||||
: '1px solid #ccc',
|
||||
display: index >= 3 ? 'none' : 'flex',
|
||||
}"
|
||||
:src="item.value"
|
||||
:alt="item.name"
|
||||
@click="chooseImg(item)"
|
||||
/>
|
||||
<div
|
||||
@click="showLearnBgMore"
|
||||
class="learnBgItem learnBgMore"
|
||||
>
|
||||
查看更多
|
||||
<img src="../../assets/images/projectadd/go.png" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <img
|
||||
class="i_upload_img"
|
||||
v-if="feng_mian_1"
|
||||
:src="feng_mian_1"
|
||||
style="width: 220px; height: 120px; border-radius: 8px"
|
||||
alt="avatar"
|
||||
/>
|
||||
<div class="i_bottom">
|
||||
<span style="color: #999ba3">
|
||||
高宽比为16:9 (如:800*450) png或jpg图片
|
||||
</span>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<div class="item_nam" style="margin-bottom: 102px">
|
||||
<div class="asterisk_icon">
|
||||
<img style="width: 10px; height: 10px" src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
<img
|
||||
style="width: 10px; height: 10px"
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">目标人群</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="i1_input">
|
||||
<a-input v-model:value="qdms_inputV2" maxlength="50"
|
||||
<!-- <a-input v-model:value="qdms_inputV2" maxlength="50"
|
||||
style="width: 440px; height: 40px; border-radius: 8px" placeholder="请输入目标人群" />
|
||||
<div class="inp_num">
|
||||
<span style="color: #c7cbd2">
|
||||
{{ qdms_inputV2.length }}/50
|
||||
</span>
|
||||
</div> -->
|
||||
<div>
|
||||
<OrgClassCheck
|
||||
v-model:value="orgSelect"
|
||||
v-model:name="orgSelectName"
|
||||
></OrgClassCheck>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<a-select
|
||||
v-model:value="selectJobId"
|
||||
mode="multiple"
|
||||
style="width: 440px; min-height: 40px"
|
||||
placeholder="请选择岗位"
|
||||
:options="jobType"
|
||||
@change="handleChangeJob"
|
||||
:fieldNames="{
|
||||
key: 'id',
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
}"
|
||||
></a-select>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<a-select
|
||||
v-model:value="selectBandName"
|
||||
mode="multiple"
|
||||
style="width: 440px; min-height: 40px"
|
||||
placeholder="请选择Band"
|
||||
:options="bandList"
|
||||
@change="handleChangeBand"
|
||||
:fieldNames="{
|
||||
key: 'id',
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
}"
|
||||
></a-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -132,49 +233,87 @@
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<div class="asterisk_icon">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="asterisk" />
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt="asterisk"
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">资源归属</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="select i6_input" style="width: 440px">
|
||||
<OrgClass
|
||||
v-model:value="sourceBelongId"
|
||||
v-model:name="sourceBelongName"
|
||||
></OrgClass>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<div class="asterisk_icon">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt="asterisk"
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">内容分类</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="select i6_input">
|
||||
<a-tree-select style="width: 440px" placeholder="请选择内容分类" :treeDefaultExpandAll="true"
|
||||
:getPopupContainer="triggerNode => triggerNode.parentNode || document.body"
|
||||
<a-tree-select
|
||||
style="width: 440px"
|
||||
placeholder="请选择内容分类"
|
||||
:treeDefaultExpandAll="true"
|
||||
:getPopupContainer="
|
||||
(triggerNode) => triggerNode.parentNode || document.body
|
||||
"
|
||||
v-model:value="fen_lei"
|
||||
:tree-data="sysTypeOptions"
|
||||
:fieldNames="{
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
value: 'code',
|
||||
}">
|
||||
}"
|
||||
>
|
||||
</a-tree-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="fen_lei" class="mbl_items">
|
||||
<div class="item_nam">
|
||||
<div class="asterisk_icon">
|
||||
</div>
|
||||
<div class="asterisk_icon"></div>
|
||||
<span style="margin-right: 14px"> </span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="select i6_input">
|
||||
<div style="width:440px;height:26px;font-size: 14px;color: rgb(153, 155, 163);">
|
||||
<div
|
||||
style="
|
||||
width: 440px;
|
||||
height: 26px;
|
||||
font-size: 14px;
|
||||
color: rgb(153, 155, 163);
|
||||
"
|
||||
>
|
||||
所属层级:{{ fen_lei1 }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam" style="margin-bottom:110px;">
|
||||
<div class="item_nam" style="margin-bottom: 110px">
|
||||
<span style="margin-right: 14px">课程价值</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="i1_input">
|
||||
<a-textarea v-model:value="qdms_inputV3" maxlength="200"
|
||||
style="width: 440px; height: 140px; border-radius: 8px" placeholder="请输入课程价值" />
|
||||
<div class="inp_num" style="top:110px;">
|
||||
<span style="color: #c7cbd2;">
|
||||
<a-textarea
|
||||
v-model:value="qdms_inputV3"
|
||||
maxlength="200"
|
||||
style="width: 440px; height: 140px; border-radius: 8px"
|
||||
placeholder="请输入课程价值"
|
||||
/>
|
||||
<div class="inp_num" style="top: 110px">
|
||||
<span style="color: #c7cbd2">
|
||||
{{ qdms_inputV3.length }}/200
|
||||
</span>
|
||||
</div>
|
||||
@@ -188,8 +327,12 @@
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="i1_input">
|
||||
<a-input v-model:value="chang_jin" maxlength="50"
|
||||
style="width: 440px; height: 40px; border-radius: 8px" placeholder="请输入场景" />
|
||||
<a-input
|
||||
v-model:value="chang_jin"
|
||||
maxlength="50"
|
||||
style="width: 440px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入场景"
|
||||
/>
|
||||
<div class="inp_num">
|
||||
<span style="color: #c7cbd2">
|
||||
{{ chang_jin.length }}/50
|
||||
@@ -214,10 +357,19 @@
|
||||
<span style="margin-right: 14px">内容标签</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<a-input v-model:value="tags_val_single" style="width: 440px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入内容标签按回车键添加内容标签,可添加多个内容标签。" @pressEnter="handleTagChange" />
|
||||
<a-input
|
||||
v-model:value="tags_val_single"
|
||||
style="width: 440px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入内容标签按回车键添加内容标签,可添加多个内容标签。"
|
||||
@pressEnter="handleTagChange"
|
||||
/>
|
||||
<div class="tag-content">
|
||||
<a-tag v-for="(item, index) in tags_val" :key="index" closable @close="handleTagClose(item)">
|
||||
<a-tag
|
||||
v-for="(item, index) in tags_val"
|
||||
:key="index"
|
||||
closable
|
||||
@close="handleTagClose(item)"
|
||||
>
|
||||
{{ item }}
|
||||
</a-tag>
|
||||
</div>
|
||||
@@ -244,16 +396,23 @@
|
||||
-->
|
||||
|
||||
<div class="mbl_items2">
|
||||
<div class="item_nam" style="margin-top: 8px;">
|
||||
<div class="item_nam" style="margin-top: 8px">
|
||||
<div class="asterisk_icon">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="asterisk" />
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt="asterisk"
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 14px">课程简介</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
<div class="i10_textarea">
|
||||
<a-textarea v-model:value="qdms_inputV6" maxlength="150"
|
||||
style="width: 440px; height: 100px; border-radius: 8px" placeholder="请输入" />
|
||||
<a-textarea
|
||||
v-model:value="qdms_inputV6"
|
||||
maxlength="150"
|
||||
style="width: 440px; height: 100px; border-radius: 8px"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
<div class="inp_num">
|
||||
<span style="color: #c7cbd2">
|
||||
{{ qdms_inputV6.length }}/150
|
||||
@@ -263,7 +422,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="mbl_items">
|
||||
<div class="item_nam" style="margin-top: 8px;">
|
||||
<div class="item_nam" style="margin-top: 8px">
|
||||
<span style="margin-right: 10px">附件</span>
|
||||
</div>
|
||||
<div class="item_inp">
|
||||
@@ -278,10 +437,19 @@
|
||||
</div>
|
||||
<div v-if="ft_hs" class="fotarea">
|
||||
<div style="border: 1px solid #ccc">
|
||||
<Toolbar style="border-bottom: 1px solid #ccc" :editor="editorRef" :defaultConfig="toolbarConfig"
|
||||
:mode="mode" />
|
||||
<Editor style="height: 250px; overflow-y: hidden" v-model="valueHtml" :defaultConfig="editorConfig"
|
||||
:mode="mode" @onCreated="handleCreated" />
|
||||
<Toolbar
|
||||
style="border-bottom: 1px solid #ccc"
|
||||
:editor="editorRef"
|
||||
:defaultConfig="toolbarConfig"
|
||||
:mode="mode"
|
||||
/>
|
||||
<Editor
|
||||
style="height: 250px; overflow-y: hidden"
|
||||
v-model="valueHtml"
|
||||
:defaultConfig="editorConfig"
|
||||
:mode="mode"
|
||||
@onCreated="handleCreated"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -303,6 +471,49 @@
|
||||
<a-spin :spinning="addLoading" tip="" />
|
||||
</div>
|
||||
</a-modal>
|
||||
|
||||
<!-- 更多背景图 v-model:visible="learnBgMore" -->
|
||||
<a-modal
|
||||
:closable="sh"
|
||||
centered="true"
|
||||
v-model:visible="learnBgMore"
|
||||
:footer="null"
|
||||
wrapClassName="courseBgMoreModal"
|
||||
:z-index="9999"
|
||||
>
|
||||
<div class="main">
|
||||
<div class="top">
|
||||
<div class="topc">面授课封面</div>
|
||||
<div @click="closeLearnBgMore">
|
||||
<img
|
||||
style="width: 20px; height: 20px"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="imagesBox">
|
||||
<div
|
||||
@click="chooseImg(item)"
|
||||
v-for="item in optionsUrl"
|
||||
:key="item.id"
|
||||
class="learnBgItem"
|
||||
:style="{
|
||||
border:
|
||||
pathBgId === item.id
|
||||
? '3px solid rgba(78, 166, 255, 1)'
|
||||
: '1px solid #ccc',
|
||||
'background-image': 'url(' + item.value + ')',
|
||||
}"
|
||||
>
|
||||
<!-- <img class="im" :src="item.source" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<button class="samtn btn1" @click="closeLearnBgMore">取消</button>
|
||||
<button class="samtn btn2" @click="closeLearnBgMore">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
@@ -326,13 +537,16 @@ import FJUpload from "@/components/common/FJUpload";
|
||||
import * as moment from "moment";
|
||||
import * as api2 from "../../api/indexAudit";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
import OrgClassCheck from "@/components/project/OrgClassCheck";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
Editor,
|
||||
Toolbar,
|
||||
FJUpload,
|
||||
NameInput,
|
||||
OrgClassCheck,
|
||||
OrgClass,
|
||||
},
|
||||
props: {
|
||||
xzinputV1: {
|
||||
@@ -367,39 +581,78 @@ export default defineComponent({
|
||||
auditDescription: "",
|
||||
contentClassify: [],
|
||||
// 课程三级分类
|
||||
projectInfo: { id: "" },
|
||||
//选择的封面图id及url
|
||||
pathBgId: null,
|
||||
pathBgUrl: null,
|
||||
learnBgMore: false, //封面图弹窗
|
||||
|
||||
//目标任务
|
||||
orgSelect: [],
|
||||
orgSelectName: [],
|
||||
orgSelectFullName: [],
|
||||
selectJobName: [],
|
||||
selectJobId: [],
|
||||
selectBandName: [],
|
||||
selectBandId: [],
|
||||
//资源归属
|
||||
sourceBelongId: [],
|
||||
sourceBelongName: [],
|
||||
sourceBelongFullName: [],
|
||||
});
|
||||
const store = useStore();
|
||||
console.log(store, 666);
|
||||
const sysTypeOptions = computed(() => store.state.content_type);
|
||||
const optionsUrl = computed(() => store.state.course_pic);
|
||||
console.log("optionsUrl", optionsUrl);
|
||||
//获取岗位
|
||||
const jobType = computed(() => store.state.job_type);
|
||||
//获取band
|
||||
const bandList = computed(() => store.state.band);
|
||||
console.log("jobTypebandList", jobType, bandList);
|
||||
watch(
|
||||
() => state.fen_lei,
|
||||
() => {
|
||||
state.fen_lei1 = findClassFullName(sysTypeOptions.value);
|
||||
}
|
||||
);
|
||||
|
||||
watch(()=>state.fen_lei,()=>{
|
||||
state.fen_lei1 = findClassFullName(sysTypeOptions.value)
|
||||
function findClassFullName(list, name = "") {
|
||||
return (
|
||||
list &&
|
||||
list.length > 0 &&
|
||||
list
|
||||
.map((e) => {
|
||||
return state.fen_lei === e.code
|
||||
? name
|
||||
? name + "-" + e.name
|
||||
: e.name
|
||||
: findClassFullName(
|
||||
e.children,
|
||||
name ? name + "-" + e.name : e.name
|
||||
);
|
||||
})
|
||||
|
||||
function findClassFullName(list,name=''){
|
||||
|
||||
return list && list.length > 0 && list.map(e=>{
|
||||
return state.fen_lei === e.code ? name?name+'-'+e.name:e.name : findClassFullName(e.children,name?name+'-'+e.name:e.name)
|
||||
}).filter(name=>name).join('')
|
||||
.filter((name) => name)
|
||||
.join("")
|
||||
);
|
||||
}
|
||||
|
||||
// 删除文件返回参数
|
||||
const changevalue = (e) => {
|
||||
let arr = state.attach.split(',')
|
||||
let newarr = []
|
||||
let arr = state.attach.split(",");
|
||||
let newarr = [];
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (i !== e) {
|
||||
newarr.push(arr[i])
|
||||
newarr.push(arr[i]);
|
||||
}
|
||||
}
|
||||
if (newarr.length == 0) {
|
||||
state.attach = "";
|
||||
} else {
|
||||
state.attach = newarr.toString()
|
||||
}
|
||||
console.log('changevalue', e, newarr, state.attach)
|
||||
state.attach = newarr.toString();
|
||||
}
|
||||
console.log("changevalue", e, newarr, state.attach);
|
||||
};
|
||||
|
||||
const visibleOpen = (offcourseId, name) => {
|
||||
state.offcourseId = offcourseId;
|
||||
@@ -427,7 +680,7 @@ console.log(store,666);
|
||||
state.ft_hs = false;
|
||||
ft_exit();
|
||||
emit("noEdit");
|
||||
}
|
||||
};
|
||||
|
||||
expose({
|
||||
visibleOpen,
|
||||
@@ -459,7 +712,20 @@ console.log(store,666);
|
||||
|
||||
valueHtml.value = "";
|
||||
|
||||
//目标任务
|
||||
state.orgSelect = [];
|
||||
state.orgSelectName = [];
|
||||
state.orgSelectFullName = [];
|
||||
state.selectJobName = [];
|
||||
state.selectJobId = [];
|
||||
state.selectBandName = [];
|
||||
state.selectBandId = [];
|
||||
//资源归属
|
||||
state.sourceBelongId = [];
|
||||
state.sourceBelongName = [];
|
||||
state.sourceBelongFullName = [];
|
||||
// valueHtml.value = "";
|
||||
console.log("清空");
|
||||
};
|
||||
|
||||
// 富文本 sssssssssssssss
|
||||
@@ -512,10 +778,11 @@ console.log(store,666);
|
||||
// 富文本 eeeeeeeeeeeeee
|
||||
|
||||
// 点击图片选择图片
|
||||
const choicePic = (value) => {
|
||||
console.log(111111112);
|
||||
state.feng_mian_1 = value;
|
||||
}
|
||||
const chooseImg = (item) => {
|
||||
console.log(item);
|
||||
state.pathBgId = item.id;
|
||||
state.feng_mian_1 = item.value;
|
||||
};
|
||||
|
||||
//获取分类、场景、封面图、-----------字典配置-------------------------------
|
||||
const options2 = ref([]);
|
||||
@@ -545,6 +812,13 @@ console.log(store,666);
|
||||
|
||||
//保存面授课
|
||||
const handlePush = async (param) => {
|
||||
console.log(
|
||||
"组织、岗位、Band、资源归属选择",
|
||||
state.orgSelect,
|
||||
state.selectJobId,
|
||||
state.selectBandId,
|
||||
state.sourceBelongId
|
||||
);
|
||||
let files = "";
|
||||
if (state.imgList.length) {
|
||||
state.imgList.forEach((item) => {
|
||||
@@ -552,12 +826,42 @@ console.log(store,666);
|
||||
});
|
||||
}
|
||||
files = files.slice(0, files.length - 1);
|
||||
console.log("filesfiles", files);
|
||||
const offName = await validateName({ name: state.qdms_inputV1, type: 2, id: state.offcourseId }).then(res => {
|
||||
|
||||
let orgSelect = [];
|
||||
if (state.orgSelect && state.orgSelect.length) {
|
||||
state.orgSelect.forEach((item) => {
|
||||
orgSelect.push({
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
let selectJobId = "";
|
||||
if (state.selectJobId.length) {
|
||||
state.selectJobId.forEach((item) => {
|
||||
selectJobId += item + ",";
|
||||
});
|
||||
}
|
||||
selectJobId = selectJobId.slice(0, selectJobId.length - 1);
|
||||
|
||||
let selectBandId = "";
|
||||
if (state.selectBandId.length) {
|
||||
state.selectBandId.forEach((item) => {
|
||||
selectBandId += item + ",";
|
||||
});
|
||||
}
|
||||
selectBandId = selectBandId.slice(0, selectBandId.length - 1);
|
||||
|
||||
console.log("filesfiles", files);
|
||||
const offName = await validateName({
|
||||
name: state.qdms_inputV1,
|
||||
type: 2,
|
||||
id: state.offcourseId,
|
||||
}).then((res) => {
|
||||
return res.data.data === 1;
|
||||
});
|
||||
console.log('校验重复',offName)
|
||||
console.log("校验重复", offName);
|
||||
if (offName) {
|
||||
message.destroy();
|
||||
return message.warning("课程名称重复,请重新填写");
|
||||
@@ -578,19 +882,34 @@ console.log(store,666);
|
||||
intro: state.qdms_inputV6,
|
||||
attach: state.attach,
|
||||
outline: valueHtml.value,
|
||||
organizationIds: orgSelect,
|
||||
jobTypeIds: selectJobId,
|
||||
bandIds: selectBandId,
|
||||
sourceBelongId: state.sourceBelongId,
|
||||
sourceBelongFullName: state.sourceBelongName,
|
||||
};
|
||||
console.log("postData");
|
||||
console.log(postData);
|
||||
console.log("postData", postData);
|
||||
const checkList = [
|
||||
postData.name,
|
||||
postData.targetUser,
|
||||
// postData.targetUser,
|
||||
// postData.categoryId,
|
||||
postData.sysTypeId,
|
||||
// postData.teacherId,
|
||||
postData.picUrl,
|
||||
postData.intro,
|
||||
postData.sourceBelongId,
|
||||
];
|
||||
console.log("checkList", checkList);
|
||||
if (
|
||||
!postData.organizationIds &&
|
||||
!postData.jobTypeIds &&
|
||||
!postData.bandIds
|
||||
) {
|
||||
message.destroy();
|
||||
return message.error("请输入必填项");
|
||||
} else {
|
||||
state.addLoading = true;
|
||||
}
|
||||
if (!checkVal(checkList)) {
|
||||
message.destroy();
|
||||
return message.error("请输入必填项");
|
||||
@@ -649,7 +968,9 @@ console.log(store,666);
|
||||
});
|
||||
if (res.rows && res.rows.length > 0) {
|
||||
let i = res.rows.length;
|
||||
state.auditDescription = res.rows[i - 1].description ? res.rows[i - 1].description : "-";
|
||||
state.auditDescription = res.rows[i - 1].description
|
||||
? res.rows[i - 1].description
|
||||
: "-";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -659,17 +980,19 @@ console.log(store,666);
|
||||
state.qdms_inputV3 = item.meaning;
|
||||
// state.fen_lei = item.categoryId;
|
||||
state.fen_lei = item.sysTypeId;
|
||||
state.chang_jin = String(item.sceneContent ? item.sceneContent : '');
|
||||
state.chang_jin = String(item.sceneContent ? item.sceneContent : "");
|
||||
state.tags_val = item.tips ? item.tips.split(",") : [];
|
||||
state.qdms_inputV6 = item.intro;
|
||||
state.member = { value: item.teacherId, name: item.teacher };
|
||||
valueHtml.value = item.outline;
|
||||
let arrss = item.attach.split(',')
|
||||
let str = ''
|
||||
let arrss = item.attach.split(",");
|
||||
let str = "";
|
||||
for (let i = 0; i < arrss.length; i++) {
|
||||
i == arrss.length - 1 ? str += arrss[i].slice(arrss[i].lastIndexOf('/') + 1) : str += arrss[i].slice(arrss[i].lastIndexOf('/') + 1) + ','
|
||||
i == arrss.length - 1
|
||||
? (str += arrss[i].slice(arrss[i].lastIndexOf("/") + 1))
|
||||
: (str += arrss[i].slice(arrss[i].lastIndexOf("/") + 1) + ",");
|
||||
}
|
||||
console.log(str)
|
||||
console.log(str);
|
||||
state.attach = str;
|
||||
};
|
||||
|
||||
@@ -687,7 +1010,7 @@ console.log(store,666);
|
||||
//提交审核
|
||||
const reviewClick = () => {
|
||||
if (state.offcourseId) {
|
||||
submitReview(state.offcourseId)
|
||||
submitReview(state.offcourseId);
|
||||
} else {
|
||||
handlePush("review");
|
||||
}
|
||||
@@ -716,6 +1039,23 @@ console.log(store,666);
|
||||
}
|
||||
});
|
||||
};
|
||||
//目标人群
|
||||
const handleChangeJob = (e, k) => {
|
||||
console.log("eeee", e, k);
|
||||
state.selectJobId = e;
|
||||
};
|
||||
const handleChangeBand = (e, k) => {
|
||||
console.log("eeeeeeeeeee", e, k);
|
||||
state.selectBandId = e;
|
||||
};
|
||||
//封面图
|
||||
const showLearnBgMore = () => {
|
||||
state.learnBgMore = true;
|
||||
};
|
||||
//关闭更多路径背景弹窗
|
||||
const closeLearnBgMore = () => {
|
||||
state.learnBgMore = false;
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
@@ -725,6 +1065,8 @@ console.log(store,666);
|
||||
options3,
|
||||
options4,
|
||||
optionsUrl,
|
||||
jobType,
|
||||
bandList,
|
||||
hideShow,
|
||||
visibleOpen,
|
||||
visibleClose,
|
||||
@@ -739,8 +1081,12 @@ console.log(store,666);
|
||||
toolbarConfig,
|
||||
editorConfig,
|
||||
handleCreated,
|
||||
choicePic,
|
||||
chooseImg,
|
||||
changevalue,
|
||||
showLearnBgMore,
|
||||
closeLearnBgMore,
|
||||
handleChangeJob,
|
||||
handleChangeBand,
|
||||
};
|
||||
},
|
||||
});
|
||||
@@ -1147,14 +1493,136 @@ console.log(store,666);
|
||||
}
|
||||
|
||||
.choiceoptionurl {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-right: 10px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.learnBgItem {
|
||||
border-radius: 8px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
// margin-bottom: 20px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.learnBgMore {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid #c7cbd2;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4ea6ff;
|
||||
line-height: 36px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.aeLoading {
|
||||
z-index: 10000;
|
||||
}
|
||||
}
|
||||
.coursemodal {
|
||||
.i1_input {
|
||||
.ant-select-selector {
|
||||
min-height: 40px !important;
|
||||
border-radius: 8px !important;
|
||||
border: 1px solid #c7cbd2 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.courseBgMoreModal {
|
||||
.ant-modal {
|
||||
width: 680px !important;
|
||||
height: 528px !important;
|
||||
|
||||
.ant-modal-content {
|
||||
width: 680px !important;
|
||||
height: 528px !important;
|
||||
|
||||
.ant-modal-body {
|
||||
width: 680px !important;
|
||||
height: 528px !important;
|
||||
padding: 0 !important;
|
||||
|
||||
.main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.top {
|
||||
padding-left: 51px;
|
||||
padding-right: 51px;
|
||||
padding-top: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
|
||||
.topc {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
line-height: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.imagesBox {
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
padding-left: 51px;
|
||||
padding-right: 39px;
|
||||
margin-top: 20px;
|
||||
height: 350px;
|
||||
overflow-y: auto;
|
||||
|
||||
.learnBgItem {
|
||||
border-radius: 8px;
|
||||
width: 136px;
|
||||
height: 106px;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
margin-bottom: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
margin-top: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.samtn {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background-color: #fff;
|
||||
color: #4ea6ff;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background-color: #4ea6ff;
|
||||
color: #fff;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-modal-close-x {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<div v-if="tableDataTotal" style="padding: 10px 35px">
|
||||
<a-table
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
style="border: 1px solid #f2f6fe;"
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tableDataFunc()"
|
||||
:data-source="tableData"
|
||||
:loading="tableLoading"
|
||||
@@ -101,20 +101,58 @@
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.key === 'operation'">
|
||||
<a-space>
|
||||
<a-button v-if="record.state==='草稿' && checkPer(record.permissions)" @click="showPub(record)" type="link">发布</a-button>
|
||||
<a-button v-if="record.state==='草稿' && checkPer(record.permissions)" @click="getLearnPathInfo(record.id)" type="link">编辑</a-button>
|
||||
<a-button v-if="record.state==='已发布' && checkPer(record.permissions)" @click="getLearnPathInfo(record.id)" type="link">编辑</a-button>
|
||||
<a-button
|
||||
v-if="record.state === '草稿' && checkPer(record.permissions)"
|
||||
@click="showPub(record)"
|
||||
type="link"
|
||||
>发布</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.state === '草稿' && checkPer(record.permissions)"
|
||||
@click="getLearnPathInfo(record.id)"
|
||||
type="link"
|
||||
>编辑</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.state === '已发布' && checkPer(record.permissions)"
|
||||
@click="getLearnPathInfo(record.id)"
|
||||
type="link"
|
||||
>编辑</a-button
|
||||
>
|
||||
<a-button @click="manage(record.id)" type="link">管理</a-button>
|
||||
<DropDown v-if="checkPer(record.permissions)" value="授权">
|
||||
<OwnerTableModelStudent :types="[7,8,9]" :id="record.id" :type="9">权限名单</OwnerTableModelStudent>
|
||||
<CommonStudent :type="7" :id="record.id" title="查看权">查看权</CommonStudent>
|
||||
<CommonStudent :type="8" :id="record.id" title="管理权">管理权</CommonStudent>
|
||||
<OwnerTableModelStudent
|
||||
:types="[7, 8, 9]"
|
||||
:id="record.id"
|
||||
:type="9"
|
||||
>权限名单</OwnerTableModelStudent
|
||||
>
|
||||
<CommonStudent :type="7" :id="record.id" title="查看权"
|
||||
>查看权</CommonStudent
|
||||
>
|
||||
<CommonStudent :type="8" :id="record.id" title="管理权"
|
||||
>管理权</CommonStudent
|
||||
>
|
||||
</DropDown>
|
||||
<DropDown v-if="checkPer(record.permissions)" value="更多">
|
||||
<a-button @click="showCopyModal(record.id)" type="link">复制</a-button>
|
||||
<a-button @click="showDeleteModal(record.id)" type="link" danger>删除</a-button>
|
||||
<a-button v-if="record.state==='已发布'" @click="showBackModal(record.id)" type="link">撤回</a-button>
|
||||
<a-button v-if="record.state==='已发布'" @click="showStopModal(record.id)" type="link">结束</a-button>
|
||||
<a-button @click="showCopyModal(record.id)" type="link"
|
||||
>复制</a-button
|
||||
>
|
||||
<a-button @click="showDeleteModal(record.id)" type="link" danger
|
||||
>删除</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.state === '已发布'"
|
||||
@click="showBackModal(record.id)"
|
||||
type="link"
|
||||
>撤回</a-button
|
||||
>
|
||||
<a-button
|
||||
v-if="record.state === '已发布'"
|
||||
@click="showStopModal(record.id)"
|
||||
type="link"
|
||||
>结束</a-button
|
||||
>
|
||||
</DropDown>
|
||||
<!-- <a-button v-if="record.state==='已结束'" @click="showStartModal(record.id)" type="link">启用</a-button> -->
|
||||
</a-space>
|
||||
@@ -244,7 +282,12 @@
|
||||
</div>
|
||||
<div class="btn">
|
||||
<button class="samtn btn1" @click="handleOut">取消</button>
|
||||
<a-button class="samtn btn2" @click="createLearnPath" :loading="confirmLoading">确定</a-button>
|
||||
<a-button
|
||||
class="samtn btn2"
|
||||
@click="createLearnPath"
|
||||
:loading="confirmLoading"
|
||||
>确定</a-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<div
|
||||
@@ -344,7 +387,7 @@
|
||||
? '2px solid rgba(78, 166, 255, 1)'
|
||||
: '1px solid #ccc',
|
||||
'background-image': 'url(' + item.value.split(',')[0] + ')',
|
||||
display: index >= 5 ? 'none' : 'flex',
|
||||
display: index >= 3 ? 'none' : 'flex',
|
||||
}"
|
||||
style="background-size: 100% 100%"
|
||||
>
|
||||
@@ -368,7 +411,12 @@
|
||||
</div>
|
||||
<div class="btn">
|
||||
<button class="samtn btn1" @click="handleOut1">取消</button>
|
||||
<a-button class="samtn btn2" @click="editLearnPath" :loading="confirmLoading">确定</a-button>
|
||||
<a-button
|
||||
class="samtn btn2"
|
||||
@click="editLearnPath"
|
||||
:loading="confirmLoading"
|
||||
>确定</a-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -390,7 +438,9 @@
|
||||
height: 68px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;">
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<div class="headerLeft" style="margin-left: 32px">
|
||||
<span style="width: 15px; height: 15px"
|
||||
><img src="../../assets/images/taskpage/pub.png"
|
||||
@@ -720,7 +770,7 @@ export default {
|
||||
setup() {
|
||||
const store = useStore();
|
||||
const router = useRouter();
|
||||
const userInfo = computed(()=>store.state.userInfo)
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
const state = reactive({
|
||||
confirmLoading: false,
|
||||
tableLoading: false,
|
||||
@@ -874,14 +924,14 @@ export default {
|
||||
const chooseImg = (item) => {
|
||||
console.log(item);
|
||||
state.pathBgId = item.code;
|
||||
state.pathBg = item.value.split(',')[0];
|
||||
state.mobilePicUrl = item.value.split(',')[1];
|
||||
state.pathBg = item.value.split(",")[0];
|
||||
state.mobilePicUrl = item.value.split(",")[1];
|
||||
};
|
||||
const chooseImg2 = (item) => {
|
||||
// console.log(item);
|
||||
state.pathBgId = item.code;
|
||||
state.pathBg = item.value.split(',')[0];
|
||||
state.mobilePicUrl = item.value.split(',')[1];
|
||||
state.pathBg = item.value.split(",")[0];
|
||||
state.mobilePicUrl = item.value.split(",")[1];
|
||||
};
|
||||
//发布弹窗
|
||||
const showPub = (router) => {
|
||||
@@ -961,10 +1011,14 @@ export default {
|
||||
const copyLearnPath = () => {
|
||||
state.copyModal = false;
|
||||
state.tableLoading = true;
|
||||
api.handleLearnPath({
|
||||
api
|
||||
.handleLearnPath({
|
||||
routerId: state.copyPathId,
|
||||
type: 2,
|
||||
}).then(() => {getLearnPath();})
|
||||
})
|
||||
.then(() => {
|
||||
getLearnPath();
|
||||
});
|
||||
message.success("复制成功");
|
||||
};
|
||||
|
||||
@@ -1158,30 +1212,30 @@ export default {
|
||||
};
|
||||
//创建学习路径图
|
||||
const createLearnPath = async () => {
|
||||
state.confirmLoading = true
|
||||
state.confirmLoading = true;
|
||||
if (!state.pathName) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
return message.warning("请输入路径图名称");
|
||||
}
|
||||
if (!state.organizationSelectName) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
return message.warning("请选择归属组织");
|
||||
}
|
||||
if (!state.pathBg) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
return message.warning("请选择背景图");
|
||||
}
|
||||
if (!state.mobilePicUrl) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
return message.warning("未配置H5背景图,请联系管理员!");
|
||||
}
|
||||
if (!state.validate) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
message.warning("路径图名称重复");
|
||||
return;
|
||||
}
|
||||
@@ -1194,10 +1248,11 @@ export default {
|
||||
});
|
||||
if (offName) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
return message.warning("项目名称重复,请重新填写");
|
||||
}
|
||||
api.createLearnPath({
|
||||
api
|
||||
.createLearnPath({
|
||||
name: state.pathName,
|
||||
remark: state.pathIntro,
|
||||
status: 0,
|
||||
@@ -1205,12 +1260,13 @@ export default {
|
||||
organizationName: state.organizationSelectName,
|
||||
picUrl: state.pathBg,
|
||||
mobilePicUrl: state.mobilePicUrl,
|
||||
}).then(id => {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
message.success("创建成功");
|
||||
router.push( {path: "/leveladd",query:{routerId: id.data.data }})
|
||||
})
|
||||
.then((id) => {
|
||||
message.destroy();
|
||||
state.confirmLoading = false;
|
||||
message.success("创建成功");
|
||||
router.push({ path: "/leveladd", query: { routerId: id.data.data } });
|
||||
});
|
||||
};
|
||||
|
||||
//获取学习路径列表
|
||||
@@ -1260,35 +1316,39 @@ export default {
|
||||
state.deleteModal = false;
|
||||
state.tableLoading = true;
|
||||
message.success("删除成功");
|
||||
api.handleLearnPath({routerId: state.deletePathId, type: -2}).then(() => {getLearnPath()})
|
||||
api
|
||||
.handleLearnPath({ routerId: state.deletePathId, type: -2 })
|
||||
.then(() => {
|
||||
getLearnPath();
|
||||
});
|
||||
};
|
||||
|
||||
//编辑学习路径图
|
||||
const editLearnPath = async () => {
|
||||
state.confirmLoading = true
|
||||
state.confirmLoading = true;
|
||||
if (!state.pathName) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
return message.warning("请输入路径图名称");
|
||||
}
|
||||
if (!state.organizationSelectName) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
return message.warning("请选择归属组织");
|
||||
}
|
||||
if (!state.pathBgId) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
return message.warning("请选择背景图");
|
||||
}
|
||||
if (!state.mobilePicUrl) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
return message.warning("未配置H5背景图,请联系管理员!");
|
||||
}
|
||||
if (!state.validate) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
return message.warning("路径图名称重复");
|
||||
}
|
||||
// state.pathName = detail.name;
|
||||
@@ -1308,11 +1368,11 @@ export default {
|
||||
});
|
||||
if (offName) {
|
||||
message.destroy();
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
return message.warning("项目名称重复,请重新填写");
|
||||
}
|
||||
state.out1 = false;
|
||||
state.confirmLoading = false
|
||||
state.confirmLoading = false;
|
||||
message.success("修改成功");
|
||||
state.tableLoading = true;
|
||||
let obj = {
|
||||
@@ -1325,7 +1385,9 @@ export default {
|
||||
organizationId: state.organizationSelectId,
|
||||
status: 0,
|
||||
};
|
||||
api.createLearnPath(obj).then(() => {getLearnPath()})
|
||||
api.createLearnPath(obj).then(() => {
|
||||
getLearnPath();
|
||||
});
|
||||
};
|
||||
//选择状态
|
||||
const selectStatusClassify = (e, v) => {
|
||||
@@ -1452,10 +1514,10 @@ export default {
|
||||
);
|
||||
function manage(id) {
|
||||
// TODO 为了点击顶部面包屑导航返回而存储
|
||||
localStorage.setItem('routerId',id)
|
||||
localStorage.setItem("routerId", id);
|
||||
router.push({
|
||||
path: "/leveladd",
|
||||
query:{routerId:id}
|
||||
query: { routerId: id },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1476,11 +1538,13 @@ export default {
|
||||
state.organizationSelectId = detail.organizationId;
|
||||
state.pathIntro = detail.remark;
|
||||
state.editPathId = id;
|
||||
const imgDict = imgData.value.find((img)=>img.value.split(',')[0] === state.pathBg)
|
||||
const imgDict = imgData.value.find(
|
||||
(img) => img.value.split(",")[0] === state.pathBg
|
||||
);
|
||||
if (imgDict) {
|
||||
state.pathBgId = imgDict.code;
|
||||
state.pathBg = imgDict.value.split(',')[0];
|
||||
state.mobilePicUrl = imgDict.value.split(',')[1];
|
||||
state.pathBg = imgDict.value.split(",")[0];
|
||||
state.mobilePicUrl = imgDict.value.split(",")[1];
|
||||
}
|
||||
|
||||
//for (let i = 0; i < arr.length; i++) {
|
||||
@@ -1541,7 +1605,7 @@ export default {
|
||||
showLearnBgMore,
|
||||
closeLearnBgMore,
|
||||
checkPer,
|
||||
getLearnPathInfo
|
||||
getLearnPathInfo,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user