mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-18 15:26:48 +08:00
feat:修改面授课
This commit is contained in:
@@ -3,60 +3,70 @@
|
|||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
<a-drawer
|
<a-drawer
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
class="drawerStyle addtestDrawer"
|
class="drawerStyle addtestDrawer"
|
||||||
width="800"
|
width="800"
|
||||||
placement="right"
|
placement="right"
|
||||||
>
|
>
|
||||||
<div class="drawerMain">
|
<div class="drawerMain">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">{{ taskIndex >= 0 ? "编辑" : "添加" }}考试</div>
|
<div class="headerTitle">
|
||||||
|
{{ taskIndex >= 0 ? "编辑" : "添加" }}考试
|
||||||
|
</div>
|
||||||
<img
|
<img
|
||||||
style="width: 29px; height: 29px; cursor: pointer"
|
style="width: 29px; height: 29px; cursor: pointer"
|
||||||
src="../../assets/images/basicinfo/close.png"
|
src="../../assets/images/basicinfo/close.png"
|
||||||
@click="closeDrawer"
|
@click="closeDrawer"
|
||||||
/>
|
/>
|
||||||
</div>
|
</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>
|
<div>
|
||||||
<button
|
<button
|
||||||
:disabled="taskIndex >= 0"
|
:disabled="taskIndex >= 0"
|
||||||
style="width: 100px; cursor: pointer;"
|
style="width: 100px; cursor: pointer"
|
||||||
@click="changeOuter(1)"
|
@click="changeOuter(1)"
|
||||||
:class="formData.examType === 1 ? 'outer' : 'notOuter'"
|
:class="formData.examType === 1 ? 'outer' : 'notOuter'"
|
||||||
>
|
>
|
||||||
系统考试
|
系统考试
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
:disabled="taskIndex >= 0"
|
:disabled="taskIndex >= 0"
|
||||||
style="width: 100px; cursor: pointer;"
|
style="width: 100px; cursor: pointer"
|
||||||
@click="changeOuter(2)"
|
@click="changeOuter(2)"
|
||||||
:class="formData.examType === 2 ? 'outer' : 'notOuter'"
|
:class="formData.examType === 2 ? 'outer' : 'notOuter'"
|
||||||
>
|
>
|
||||||
外部考试
|
外部考试
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="formData.examType===1" class="contentMain">
|
<div v-if="formData.examType === 1" class="contentMain">
|
||||||
<div class="main_left">
|
<div class="main_left">
|
||||||
<div class="main_item">
|
<div class="main_item">
|
||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">考试名称:</span>
|
<span style="margin-right: 3px">考试名称:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="formData.examinationName"
|
v-model:value="formData.examinationName"
|
||||||
style="width: 400px; height: 40px; border-radius: 8px"
|
style="width: 400px; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入考试名称"
|
placeholder="请输入考试名称"
|
||||||
:maxlength="20"
|
:maxlength="20"
|
||||||
:disabled="taskIndex >= 0"
|
:disabled="taskIndex >= 0"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -65,22 +75,36 @@
|
|||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">选择试卷:</span>
|
<span style="margin-right: 3px">选择试卷:</span>
|
||||||
</div>
|
</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">
|
<div class="btnbox">
|
||||||
<button class="xkbtn" style="margin:0" :disabled="taskIndex >= 0">
|
<button
|
||||||
|
class="xkbtn"
|
||||||
|
style="margin: 0"
|
||||||
|
:disabled="taskIndex >= 0"
|
||||||
|
>
|
||||||
{{ formData.examinationPaperId ? "重选" : "选择" }}试卷
|
{{ formData.examinationPaperId ? "重选" : "选择" }}试卷
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</s-test>
|
</s-test>
|
||||||
<div v-if="formData.examinationPaperId">
|
<div v-if="formData.examinationPaperId">
|
||||||
<a-tag closable color="processing" @close="delTag" :closeIcon="true">
|
<a-tag
|
||||||
<span style="font-size: 14px; line-height: 33px">{{ formData.examinationTestName }}</span>
|
closable
|
||||||
|
color="processing"
|
||||||
|
@close="delTag"
|
||||||
|
:closeIcon="true"
|
||||||
|
>
|
||||||
|
<span style="font-size: 14px; line-height: 33px">{{
|
||||||
|
formData.examinationTestName
|
||||||
|
}}</span>
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -89,22 +113,22 @@
|
|||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">考试时间:</span>
|
<span style="margin-right: 3px">考试时间:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
style="width: 400px; height: 40px; border-radius: 8px"
|
style="width: 400px; height: 40px; border-radius: 8px"
|
||||||
:show-time="{format:'hh:mm'}"
|
:show-time="{ format: 'hh:mm' }"
|
||||||
:disabled-date="disabledDate"
|
:disabled-date="disabledDate"
|
||||||
format="YYYY-MM-DD HH:mm"
|
format="YYYY-MM-DD HH:mm"
|
||||||
valueFormat="YYYY-MM-DD HH:mm"
|
valueFormat="YYYY-MM-DD HH:mm"
|
||||||
v-model:value="dateTime"
|
v-model:value="dateTime"
|
||||||
@change="timeChange"
|
@change="timeChange"
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -112,20 +136,20 @@
|
|||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">考试时长:</span>
|
<span style="margin-right: 3px">考试时长:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<a-input-number
|
<a-input-number
|
||||||
:disabled="taskIndex >= 0"
|
:disabled="taskIndex >= 0"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="300"
|
:max="300"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
style="width: 400px; height: 40px; border-radius: 8px"
|
style="width: 400px; height: 40px; border-radius: 8px"
|
||||||
v-model:value="formData.examinationDuration"
|
v-model:value="formData.examinationDuration"
|
||||||
></a-input-number>
|
></a-input-number>
|
||||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -134,18 +158,18 @@
|
|||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">及格线:</span>
|
<span style="margin-right: 3px">及格线:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input
|
<a-input
|
||||||
:disabled="taskIndex >= 0"
|
:disabled="taskIndex >= 0"
|
||||||
v-model:value="formData.passLine"
|
v-model:value="formData.passLine"
|
||||||
type="number"
|
type="number"
|
||||||
style="width: 400px; height: 40px; border-radius: 8px"
|
style="width: 400px; height: 40px; border-radius: 8px"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span style="color: #999999; margin-left: 8px">分</span>
|
<span style="color: #999999; margin-left: 8px">分</span>
|
||||||
@@ -157,38 +181,41 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="textarea">
|
<div class="textarea">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
:disabled="taskIndex >= 0"
|
:disabled="taskIndex >= 0"
|
||||||
v-model:value="formData.examinationExplain"
|
v-model:value="formData.examinationExplain"
|
||||||
placeholder="请输入考试说明"
|
placeholder="请输入考试说明"
|
||||||
allow-clear
|
allow-clear
|
||||||
show-count
|
show-count
|
||||||
:maxlength="200"
|
:maxlength="200"
|
||||||
:rows="6"
|
:rows="6"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_item2">
|
<div class="main_item2">
|
||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<span style="margin-right: 3px;margin-top: 10px;">考试限制:</span>
|
<span style="margin-right: 3px; margin-top: 10px"
|
||||||
|
>考试限制:</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="kqszbox">
|
<div class="kqszbox">
|
||||||
<div class="setbox">
|
<div class="setbox">
|
||||||
<div class="timerbox">
|
<div class="timerbox">
|
||||||
<span>允许重复考试:</span>
|
<span>允许重复考试:</span>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
:disabled="taskIndex >= 0"
|
:disabled="taskIndex >= 0"
|
||||||
:min="-1"
|
:min="-1"
|
||||||
:max="300"
|
:max="300"
|
||||||
:precision="0"
|
:precision="0"
|
||||||
style="
|
style="
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;"
|
overflow: hidden;
|
||||||
v-model:value="formData.examinationLimit"
|
"
|
||||||
|
v-model:value="formData.examinationLimit"
|
||||||
></a-input-number>
|
></a-input-number>
|
||||||
<span style="color: #999999; margin-left: 8px"
|
<span style="color: #999999; margin-left: 8px"
|
||||||
>次,-1表示无限制</span
|
>次,-1表示无限制</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -201,9 +228,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
:disabled="taskIndex >= 0"
|
:disabled="taskIndex >= 0"
|
||||||
style="margin-right: 12px"
|
style="margin-right: 12px"
|
||||||
v-model:value="formData.showAnswers"
|
v-model:value="formData.showAnswers"
|
||||||
>
|
>
|
||||||
<a-radio :value="1">允许查看</a-radio>
|
<a-radio :value="1">允许查看</a-radio>
|
||||||
<a-radio :value="2">不允许查看</a-radio>
|
<a-radio :value="2">不允许查看</a-radio>
|
||||||
@@ -216,9 +243,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
:disabled="taskIndex >= 0"
|
:disabled="taskIndex >= 0"
|
||||||
style="margin-right: 12px"
|
style="margin-right: 12px"
|
||||||
v-model:value="formData.showAnalysis"
|
v-model:value="formData.showAnalysis"
|
||||||
>
|
>
|
||||||
<a-radio :value="1">允许查看</a-radio>
|
<a-radio :value="1">允许查看</a-radio>
|
||||||
<a-radio :value="2">不允许查看</a-radio>
|
<a-radio :value="2">不允许查看</a-radio>
|
||||||
@@ -231,9 +258,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
:disabled="taskIndex >= 0"
|
:disabled="taskIndex >= 0"
|
||||||
style="margin-right: 12px"
|
style="margin-right: 12px"
|
||||||
v-model:value="formData.scoringModel"
|
v-model:value="formData.scoringModel"
|
||||||
>
|
>
|
||||||
<a-radio :value="1">最高一次</a-radio>
|
<a-radio :value="1">最高一次</a-radio>
|
||||||
<a-radio :value="2">最后一次</a-radio>
|
<a-radio :value="2">最后一次</a-radio>
|
||||||
@@ -241,16 +268,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="main_item">
|
<div class="main_item">
|
||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<span style="margin-right: 3px">试题排列:</span>
|
<span style="margin-right: 3px">试题排列:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
:disabled="taskIndex >= 0"
|
:disabled="taskIndex >= 0"
|
||||||
style="margin-right: 12px"
|
style="margin-right: 12px"
|
||||||
v-model:value="formData.questionArrangement"
|
v-model:value="formData.questionArrangement"
|
||||||
>
|
>
|
||||||
<a-radio :value="1">试题乱序</a-radio>
|
<a-radio :value="1">试题乱序</a-radio>
|
||||||
<a-radio :value="2">选项乱序</a-radio>
|
<a-radio :value="2">选项乱序</a-radio>
|
||||||
@@ -259,7 +285,7 @@
|
|||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_item" style="height: 20px;"></div>
|
<div class="main_item" style="height: 20px"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="contentMain">
|
<div v-else class="contentMain">
|
||||||
@@ -268,18 +294,18 @@
|
|||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">考试名称:</span>
|
<span style="margin-right: 3px">考试名称:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="formData.examinationName"
|
v-model:value="formData.examinationName"
|
||||||
style="width: 400px; height: 40px; border-radius: 8px"
|
style="width: 400px; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入考试名称"
|
placeholder="请输入考试名称"
|
||||||
:maxlength="20"
|
:maxlength="20"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -287,18 +313,18 @@
|
|||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
src="@/assets/images/coursewareManage/asterisk.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">数据来源:</span>
|
<span style="margin-right: 3px">数据来源:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="formData.source"
|
v-model:value="formData.source"
|
||||||
style="width: 400px; height: 40px; border-radius: 8px"
|
style="width: 400px; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入数据来源"
|
placeholder="请输入数据来源"
|
||||||
:maxlength="20"
|
:maxlength="20"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -308,12 +334,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="textarea">
|
<div class="textarea">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="formData.externalExplain"
|
v-model:value="formData.externalExplain"
|
||||||
placeholder="请输入考试说明"
|
placeholder="请输入考试说明"
|
||||||
allow-clear
|
allow-clear
|
||||||
show-count
|
show-count
|
||||||
:maxlength="200"
|
:maxlength="200"
|
||||||
:rows="6"
|
:rows="6"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -327,150 +353,160 @@
|
|||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {defineEmits, defineProps, ref, watch} from "vue";
|
import { defineEmits, defineProps, ref, watch } from "vue";
|
||||||
import STest from "./SelectTest.vue";
|
import STest from "./SelectTest.vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import {Form, message} from "ant-design-vue";
|
import { Form, message } from "ant-design-vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: Number,
|
type: Number,
|
||||||
taskList: []
|
taskList: [],
|
||||||
})
|
});
|
||||||
const visible = ref(false)
|
const visible = ref(false);
|
||||||
const initValue = {
|
const initValue = {
|
||||||
examinationName: '',
|
examinationName: "",
|
||||||
examinationPaperId: '',
|
examinationPaperId: "",
|
||||||
examinationStartTime: '',
|
examinationStartTime: "",
|
||||||
examinationEndTime: '',
|
examinationEndTime: "",
|
||||||
examinationDuration: '',
|
examinationDuration: "",
|
||||||
passLine: '',
|
passLine: "",
|
||||||
examType: 1,
|
examType: 1,
|
||||||
source: "",
|
source: "",
|
||||||
showAnswers: 2,
|
showAnswers: 2,
|
||||||
showAnalysis: 2,
|
showAnalysis: 2,
|
||||||
scoringModel: 2,
|
scoringModel: 2,
|
||||||
questionArrangement: 4,
|
questionArrangement: 4,
|
||||||
externalExplain: ""
|
externalExplain: "",
|
||||||
}
|
};
|
||||||
const formData = ref(initValue)
|
const formData = ref(initValue);
|
||||||
const innerRule = {
|
const innerRule = {
|
||||||
examinationName: [
|
examinationName: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入考试名称',
|
message: "请输入考试名称",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
examinationPaperId: [
|
examinationPaperId: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入选择试卷',
|
message: "请输入选择试卷",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
examinationStartTime: [
|
examinationStartTime: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入开始开始时间',
|
message: "请输入开始开始时间",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
examinationEndTime: [
|
examinationEndTime: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入开始结束时间',
|
message: "请输入开始结束时间",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
examinationDuration: [
|
examinationDuration: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入考试时长',
|
message: "请输入考试时长",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
passLine: [
|
passLine: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入及格线',
|
message: "请输入及格线",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
};
|
||||||
const outerRule = {
|
const outerRule = {
|
||||||
examinationName: [
|
examinationName: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入考试名称',
|
message: "请输入考试名称",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
source: [
|
source: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入数据来源',
|
message: "请输入数据来源",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
};
|
||||||
const rulesRef = ref(innerRule);
|
const rulesRef = ref(innerRule);
|
||||||
|
|
||||||
const emit = defineEmits({})
|
const emit = defineEmits({});
|
||||||
const taskIndex = ref(-1);
|
const taskIndex = ref(-1);
|
||||||
const dateTime = ref([]);
|
const dateTime = ref([]);
|
||||||
|
|
||||||
const {resetFields, validate} = Form.useForm(formData, rulesRef);
|
const { resetFields, validate } = Form.useForm(formData, rulesRef);
|
||||||
|
|
||||||
watch(() => formData.value.examType, () => {
|
watch(
|
||||||
formData.value.examType === 1 ? rulesRef.value = innerRule : rulesRef.value = outerRule
|
() => formData.value.examType,
|
||||||
})
|
() => {
|
||||||
|
formData.value.examType === 1
|
||||||
|
? (rulesRef.value = innerRule)
|
||||||
|
: (rulesRef.value = outerRule);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
visible.value = false
|
visible.value = false;
|
||||||
taskIndex.value = -1
|
taskIndex.value = -1;
|
||||||
resetFields()
|
resetFields();
|
||||||
dateTime.value = []
|
dateTime.value = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function timeChange(time, timeStr) {
|
function timeChange(time, timeStr) {
|
||||||
formData.value.examinationStartTime = timeStr[0]
|
formData.value.examinationStartTime = timeStr[0];
|
||||||
formData.value.examinationEndTime = timeStr[1]
|
formData.value.examinationEndTime = timeStr[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
const disabledDate = (current) => {
|
const disabledDate = (current) => {
|
||||||
return current && current < dayjs().startOf('day');
|
return current && current < dayjs().startOf("day");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 系统考试
|
// 系统考试
|
||||||
async function confirm() {
|
async function confirm() {
|
||||||
await validate().catch(({errorFields}) => {
|
await validate().catch(({ errorFields }) => {
|
||||||
message.warning(errorFields[0].errors.join());
|
message.warning(errorFields[0].errors.join());
|
||||||
throw Error("数据校验不通过")
|
throw Error("数据校验不通过");
|
||||||
});
|
});
|
||||||
if (taskIndex.value === -1) {
|
if (taskIndex.value === -1) {
|
||||||
const list = props.taskList
|
const list = props.taskList;
|
||||||
list.push({name: formData.value.examinationName, type: props.type, info: {...formData.value}})
|
list.push({
|
||||||
|
name: formData.value.examinationName,
|
||||||
|
type: props.type,
|
||||||
|
info: { ...formData.value },
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
const data = props.taskList[taskIndex.value]
|
const data = props.taskList[taskIndex.value];
|
||||||
data.name = formData.value.examinationName
|
data.name = formData.value.examinationName;
|
||||||
data.info = formData.value
|
data.info = formData.value;
|
||||||
}
|
}
|
||||||
emit('update:taskList', [...props.taskList])
|
emit("update:taskList", [...props.taskList]);
|
||||||
closeDrawer()
|
closeDrawer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function openDrawer(i, row) {
|
function openDrawer(i, row) {
|
||||||
row && resetFields(row.info);
|
row && resetFields(row.info);
|
||||||
row && (dateTime.value = [row.info.examinationStartTime, row.info.examinationEndTime]);
|
row &&
|
||||||
(i >= 0) && (taskIndex.value = i);
|
(dateTime.value = [
|
||||||
visible.value = true
|
row.info.examinationStartTime,
|
||||||
|
row.info.examinationEndTime,
|
||||||
|
]);
|
||||||
|
i >= 0 && (taskIndex.value = i);
|
||||||
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const delTag = () => {
|
const delTag = () => {
|
||||||
formData.value.examinationPaperId = '';
|
formData.value.examinationPaperId = "";
|
||||||
formData.value.examinationTestName = '';
|
formData.value.examinationTestName = "";
|
||||||
}
|
};
|
||||||
|
|
||||||
function changeOuter(v) {
|
function changeOuter(v) {
|
||||||
formData.value.examType = v;
|
formData.value.examType = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({openDrawer})
|
defineExpose({ openDrawer });
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
@@ -610,7 +646,6 @@ defineExpose({openDrawer})
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
|
||||||
.timerbox {
|
.timerbox {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
margin-right: 32px;
|
margin-right: 32px;
|
||||||
@@ -666,8 +701,8 @@ defineExpose({openDrawer})
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ant-table-tbody
|
.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 {
|
> td {
|
||||||
background: #f6f9fd;
|
background: #f6f9fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,22 +2,33 @@
|
|||||||
<div @click="openDrawer">
|
<div @click="openDrawer">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
<a-drawer :visible="visible" class="drawerStyle addonlineDrawer" width="800" title="选择测评"
|
<a-drawer
|
||||||
placement="right">
|
:visible="visible"
|
||||||
|
class="drawerStyle addonlineDrawer"
|
||||||
|
width="800"
|
||||||
|
title="选择测评"
|
||||||
|
placement="right"
|
||||||
|
>
|
||||||
<div class="drawerMain">
|
<div class="drawerMain">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">选择测评</div>
|
<div class="headerTitle">选择测评</div>
|
||||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
<img
|
||||||
@click="closeDrawer"/>
|
style="width: 29px; height: 29px; cursor: pointer"
|
||||||
|
src="../../assets/images/basicinfo/close.png"
|
||||||
|
@click="closeDrawer"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="contentMain">
|
<div class="contentMain" v-if="data.length > 0">
|
||||||
<div class="main_items">
|
<div class="main_items">
|
||||||
<div class="mi_ipts">
|
<div class="mi_ipts">
|
||||||
<div class="mii_ipt">
|
<div class="mii_ipt">
|
||||||
<div class="ipt_name"></div>
|
<div class="ipt_name"></div>
|
||||||
<div class="fi_input">
|
<div class="fi_input">
|
||||||
<a-input v-model:value="params.keyword" style="width: 424px; height: 40px; border-radius: 8px"
|
<a-input
|
||||||
placeholder="请输入测评名称"/>
|
v-model:value="params.keyword"
|
||||||
|
style="width: 424px; height: 40px; border-radius: 8px"
|
||||||
|
placeholder="请输入测评名称"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -34,18 +45,97 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="main_table">
|
<div class="main_table">
|
||||||
<a-table
|
<a-table
|
||||||
:customRow="customRow"
|
:customRow="customRow"
|
||||||
class="ant-table-striped"
|
class="ant-table-striped"
|
||||||
:row-class-name="(_, index) => (index % 2 === 1 ? 'table-striped' : null)"
|
:row-class-name="
|
||||||
row-key="id"
|
(_, index) => (index % 2 === 1 ? 'table-striped' : null)
|
||||||
:columns="columns"
|
"
|
||||||
:data-source="data"
|
row-key="id"
|
||||||
:loading="loading"
|
:columns="columns"
|
||||||
:pagination="pagination"
|
:data-source="data"
|
||||||
:row-selection="rowSelection"
|
:loading="loading"
|
||||||
|
:pagination="pagination"
|
||||||
|
:row-selection="rowSelection"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<div class="main_btns">
|
||||||
<button class="btn1" @click="closeDrawer">取消</button>
|
<button class="btn1" @click="closeDrawer">取消</button>
|
||||||
<button class="btn2" @click="confirm">确定</button>
|
<button class="btn2" @click="confirm">确定</button>
|
||||||
@@ -54,19 +144,83 @@
|
|||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, defineEmits, defineProps, ref, watch} from "vue";
|
import { computed, defineEmits, defineProps, ref, watch } from "vue";
|
||||||
import {useBoeApiPage} from "@/api/request";
|
import { useBoeApiPage } from "@/api/request";
|
||||||
import {TEST_PAGE} from "@/api/ThirdApi";
|
import { TEST_PAGE } from "@/api/ThirdApi";
|
||||||
import {message} from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import {useStore} from "vuex";
|
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({
|
const props = defineProps({
|
||||||
taskList: [],
|
taskList: [],
|
||||||
evaluationTypeId: String,
|
evaluationTypeId: String,
|
||||||
evaluationTypeName: Number
|
evaluationTypeName: Number,
|
||||||
})
|
});
|
||||||
const visible = ref(false)
|
const visible = ref(false);
|
||||||
const emit = defineEmits({})
|
const emit = defineEmits({});
|
||||||
|
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
@@ -100,50 +254,54 @@ const columns = ref([
|
|||||||
align: "center",
|
align: "center",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
])
|
]);
|
||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
|
|
||||||
const initParams = {
|
const initParams = {
|
||||||
keyword: '',
|
keyword: "",
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
user_id: store.state.userInfo.id
|
user_id: store.state.userInfo.id,
|
||||||
// orderAsc: true
|
// orderAsc: true
|
||||||
}
|
};
|
||||||
const params = ref(initParams)
|
const params = ref(initParams);
|
||||||
|
|
||||||
const rowSelectKeys = ref([]);
|
const rowSelectKeys = ref([]);
|
||||||
const selectsData = ref([]);
|
const selectsData = ref([]);
|
||||||
const taskIndex = ref(-1);
|
const taskIndex = ref(-1);
|
||||||
|
|
||||||
const {data, loading, total, fetch} = useBoeApiPage(TEST_PAGE, params.value, {
|
const { data, loading, total, fetch } = useBoeApiPage(TEST_PAGE, params.value, {
|
||||||
init: false,
|
init: false,
|
||||||
result: res => {
|
result: (res) => {
|
||||||
let newArr = []
|
console.log("获取测评", res);
|
||||||
|
let newArr = [];
|
||||||
for (let i = 0; i < res.result.data.length; i++) {
|
for (let i = 0; i < res.result.data.length; i++) {
|
||||||
res.result.data[i].id = res.result.data[i].quiz_kid;
|
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,
|
totalPage: (res) => res.result.total_page_num,
|
||||||
total: res => res.result.count
|
total: (res) => res.result.count,
|
||||||
})
|
});
|
||||||
console.log(data, 222)
|
|
||||||
watch(taskIndex, () => {
|
watch(taskIndex, () => {
|
||||||
if (taskIndex.value >= 0) {
|
if (taskIndex.value >= 0) {
|
||||||
rowSelectKeys.value = [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) || {}
|
selectsData.value =
|
||||||
|
data.value.find(
|
||||||
|
(t) => t.id === props.taskList[taskIndex.value].courseId
|
||||||
|
) || {};
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
const customRow = (record) => ({
|
const customRow = (record) => ({
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
rowSelectKeys.value = [record.id]
|
rowSelectKeys.value = [record.id];
|
||||||
selectsData.value = [record]
|
selectsData.value = [record];
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
|
|
||||||
const pagination = computed(() => ({
|
const pagination = computed(() => ({
|
||||||
total: total.value,
|
total: total.value,
|
||||||
@@ -155,20 +313,20 @@ const pagination = computed(() => ({
|
|||||||
|
|
||||||
const changePagination = (e) => {
|
const changePagination = (e) => {
|
||||||
params.value.pageIndex = e;
|
params.value.pageIndex = e;
|
||||||
fetch()
|
fetch();
|
||||||
};
|
};
|
||||||
const rowSelection = computed(() => ({
|
const rowSelection = computed(() => ({
|
||||||
type: 'radio',
|
type: "radio",
|
||||||
columnWidth: 20,
|
columnWidth: 20,
|
||||||
selectedRowKeys: rowSelectKeys.value,
|
selectedRowKeys: rowSelectKeys.value,
|
||||||
onChange: onSelectChange,
|
onChange: onSelectChange,
|
||||||
preserveSelectedRowKeys: true,
|
preserveSelectedRowKeys: true,
|
||||||
getCheckboxProps: getCheckboxProps
|
getCheckboxProps: getCheckboxProps,
|
||||||
}));
|
}));
|
||||||
const getCheckboxProps = () => ({
|
const getCheckboxProps = () => ({
|
||||||
// 某几项默认禁止选中(R: 当state等于1时)
|
// 某几项默认禁止选中(R: 当state等于1时)
|
||||||
disabled: false
|
disabled: false,
|
||||||
})
|
});
|
||||||
|
|
||||||
function onSelectChange(e, l) {
|
function onSelectChange(e, l) {
|
||||||
rowSelectKeys.value = e;
|
rowSelectKeys.value = e;
|
||||||
@@ -176,28 +334,28 @@ function onSelectChange(e, l) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function search() {
|
function search() {
|
||||||
params.value.pageIndex = 1
|
params.value.pageIndex = 1;
|
||||||
fetch()
|
fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
rowSelectKeys.value = [];
|
rowSelectKeys.value = [];
|
||||||
selectsData.value = [];
|
selectsData.value = [];
|
||||||
params.value.pageIndex = 1
|
params.value.pageIndex = 1;
|
||||||
params.value.keyWord = ''
|
params.value.keyWord = "";
|
||||||
fetch()
|
fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
visible.value = false
|
visible.value = false;
|
||||||
taskIndex.value = -1
|
taskIndex.value = -1;
|
||||||
reset()
|
reset();
|
||||||
};
|
};
|
||||||
|
|
||||||
function confirm() {
|
function confirm() {
|
||||||
if (!selectsData.value.length || !rowSelectKeys.value.length) {
|
if (!selectsData.value.length || !rowSelectKeys.value.length) {
|
||||||
message.warning("请选择测评!");
|
message.warning("请选择测评!");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
// if (taskIndex.value === -1) {
|
// if (taskIndex.value === -1) {
|
||||||
// let list = props.taskList
|
// let list = props.taskList
|
||||||
@@ -220,18 +378,17 @@ function confirm() {
|
|||||||
// if(props.taskList!=undefined){
|
// if(props.taskList!=undefined){
|
||||||
// emit('update:taskList', [...props.taskList])
|
// emit('update:taskList', [...props.taskList])
|
||||||
// }
|
// }
|
||||||
emit('update:evaluationTypeId', selectsData.value[0].id)
|
emit("update:evaluationTypeId", selectsData.value[0].id);
|
||||||
emit('update:evaluationTypeName', selectsData.value[0].title)
|
emit("update:evaluationTypeName", selectsData.value[0].title);
|
||||||
closeDrawer()
|
closeDrawer();
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDrawer(i) {
|
function openDrawer(i) {
|
||||||
(i >= 0) && (taskIndex.value = i)
|
i >= 0 && (taskIndex.value = i);
|
||||||
visible.value = true
|
visible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({openDrawer})
|
defineExpose({ openDrawer });
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
@@ -417,7 +574,9 @@ defineExpose({openDrawer})
|
|||||||
background-color: #eff4fc !important;
|
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;
|
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 {
|
.main_btns {
|
||||||
height: 72px;
|
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>
|
<template>
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
:getPopupContainer="
|
:getPopupContainer="
|
||||||
@@ -28,7 +36,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { defineEmits, defineProps, ref, watch } from "vue";
|
import { defineEmits, defineProps, ref, watch } from "vue";
|
||||||
import {boeRequest, useBoeApi} from "@/api/request";
|
import { boeRequest, useBoeApi } from "@/api/request";
|
||||||
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/ThirdApi";
|
import { ORG_CHILD_LIST, ORG_LIST } from "@/api/ThirdApi";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -79,6 +87,7 @@ function change(
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
console.log("label2222", label, namePath, value);
|
||||||
emit("update:name", label);
|
emit("update:name", label);
|
||||||
emit("update:fullName", namePath);
|
emit("update:fullName", namePath);
|
||||||
emit("update:value", value);
|
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>
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -87,39 +87,77 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 无数据 -->
|
<!-- 无数据 -->
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<div v-if="tableDataTotal" style="padding:10px 35px">
|
<div v-if="tableDataTotal" style="padding: 10px 35px">
|
||||||
<a-table
|
<a-table
|
||||||
:header-cell-style="{'text-align':'center'}"
|
:header-cell-style="{ 'text-align': 'center' }"
|
||||||
style="border: 1px solid #f2f6fe;"
|
style="border: 1px solid #f2f6fe"
|
||||||
:columns="tableDataFunc()"
|
:columns="tableDataFunc()"
|
||||||
:data-source="tableData"
|
:data-source="tableData"
|
||||||
:loading="tableLoading"
|
:loading="tableLoading"
|
||||||
@expand="expandTable"
|
@expand="expandTable"
|
||||||
:scroll="{x:'max-content'}"
|
:scroll="{ x: 'max-content' }"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ record, column }">
|
<template #bodyCell="{ record, column }">
|
||||||
<template v-if="column.key === 'operation'">
|
<template v-if="column.key === 'operation'">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-if="record.state==='草稿' && checkPer(record.permissions)" @click="showPub(record)" type="link">发布</a-button>
|
<a-button
|
||||||
<a-button v-if="record.state==='草稿' && checkPer(record.permissions)" @click="getLearnPathInfo(record.id)" type="link">编辑</a-button>
|
v-if="record.state === '草稿' && checkPer(record.permissions)"
|
||||||
<a-button v-if="record.state==='已发布' && checkPer(record.permissions)" @click="getLearnPathInfo(record.id)" type="link">编辑</a-button>
|
@click="showPub(record)"
|
||||||
<a-button @click="manage(record.id)" type="link">管理</a-button>
|
type="link"
|
||||||
<DropDown v-if="checkPer(record.permissions)" value="授权">
|
>发布</a-button
|
||||||
<OwnerTableModelStudent :types="[7,8,9]" :id="record.id" :type="9">权限名单</OwnerTableModelStudent>
|
>
|
||||||
<CommonStudent :type="7" :id="record.id" title="查看权">查看权</CommonStudent>
|
<a-button
|
||||||
<CommonStudent :type="8" :id="record.id" title="管理权">管理权</CommonStudent>
|
v-if="record.state === '草稿' && checkPer(record.permissions)"
|
||||||
</DropDown>
|
@click="getLearnPathInfo(record.id)"
|
||||||
<DropDown v-if="checkPer(record.permissions)" value="更多">
|
type="link"
|
||||||
<a-button @click="showCopyModal(record.id)" type="link">复制</a-button>
|
>编辑</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
|
||||||
<a-button v-if="record.state==='已发布'" @click="showStopModal(record.id)" type="link">结束</a-button>
|
v-if="record.state === '已发布' && checkPer(record.permissions)"
|
||||||
</DropDown>
|
@click="getLearnPathInfo(record.id)"
|
||||||
<!-- <a-button v-if="record.state==='已结束'" @click="showStartModal(record.id)" type="link">启用</a-button> -->
|
type="link"
|
||||||
</a-space>
|
>编辑</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
|
||||||
|
>
|
||||||
|
</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
|
||||||
|
>
|
||||||
|
</DropDown>
|
||||||
|
<!-- <a-button v-if="record.state==='已结束'" @click="showStartModal(record.id)" type="link">启用</a-button> -->
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
@@ -244,7 +282,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<button class="samtn btn1" @click="handleOut">取消</button>
|
<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>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -344,7 +387,7 @@
|
|||||||
? '2px solid rgba(78, 166, 255, 1)'
|
? '2px solid rgba(78, 166, 255, 1)'
|
||||||
: '1px solid #ccc',
|
: '1px solid #ccc',
|
||||||
'background-image': 'url(' + item.value.split(',')[0] + ')',
|
'background-image': 'url(' + item.value.split(',')[0] + ')',
|
||||||
display: index >= 5 ? 'none' : 'flex',
|
display: index >= 3 ? 'none' : 'flex',
|
||||||
}"
|
}"
|
||||||
style="background-size: 100% 100%"
|
style="background-size: 100% 100%"
|
||||||
>
|
>
|
||||||
@@ -368,7 +411,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<button class="samtn btn1" @click="handleOut1">取消</button>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -390,7 +438,9 @@
|
|||||||
height: 68px;
|
height: 68px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;">
|
justify-content: space-between;
|
||||||
|
"
|
||||||
|
>
|
||||||
<div class="headerLeft" style="margin-left: 32px">
|
<div class="headerLeft" style="margin-left: 32px">
|
||||||
<span style="width: 15px; height: 15px"
|
<span style="width: 15px; height: 15px"
|
||||||
><img src="../../assets/images/taskpage/pub.png"
|
><img src="../../assets/images/taskpage/pub.png"
|
||||||
@@ -702,7 +752,7 @@ import OrgClass from "@/components/project/OrgClass";
|
|||||||
import NameInput from "@/components/project/NameInput";
|
import NameInput from "@/components/project/NameInput";
|
||||||
import { validateName } from "@/api/index1";
|
import { validateName } from "@/api/index1";
|
||||||
import DropDown from "@/components/common/DropDown";
|
import DropDown from "@/components/common/DropDown";
|
||||||
import {checkPer} from "@/utils/utils";
|
import { checkPer } from "@/utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "learningPath",
|
name: "learningPath",
|
||||||
@@ -720,9 +770,9 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const userInfo = computed(()=>store.state.userInfo)
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
confirmLoading:false,
|
confirmLoading: false,
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
out: false,
|
out: false,
|
||||||
out1: false,
|
out1: false,
|
||||||
@@ -857,7 +907,7 @@ export default {
|
|||||||
state.pathIntro = "";
|
state.pathIntro = "";
|
||||||
state.out = !state.out;
|
state.out = !state.out;
|
||||||
if (userInfo.value.departId && userInfo.value.departName) {
|
if (userInfo.value.departId && userInfo.value.departName) {
|
||||||
state.organizationSelectName =userInfo.value.departName;
|
state.organizationSelectName = userInfo.value.departName;
|
||||||
state.organizationSelectId = userInfo.value.departId;
|
state.organizationSelectId = userInfo.value.departId;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -874,14 +924,14 @@ export default {
|
|||||||
const chooseImg = (item) => {
|
const chooseImg = (item) => {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
state.pathBgId = item.code;
|
state.pathBgId = item.code;
|
||||||
state.pathBg = item.value.split(',')[0];
|
state.pathBg = item.value.split(",")[0];
|
||||||
state.mobilePicUrl = item.value.split(',')[1];
|
state.mobilePicUrl = item.value.split(",")[1];
|
||||||
};
|
};
|
||||||
const chooseImg2 = (item) => {
|
const chooseImg2 = (item) => {
|
||||||
// console.log(item);
|
// console.log(item);
|
||||||
state.pathBgId = item.code;
|
state.pathBgId = item.code;
|
||||||
state.pathBg = item.value.split(',')[0];
|
state.pathBg = item.value.split(",")[0];
|
||||||
state.mobilePicUrl = item.value.split(',')[1];
|
state.mobilePicUrl = item.value.split(",")[1];
|
||||||
};
|
};
|
||||||
//发布弹窗
|
//发布弹窗
|
||||||
const showPub = (router) => {
|
const showPub = (router) => {
|
||||||
@@ -961,10 +1011,14 @@ export default {
|
|||||||
const copyLearnPath = () => {
|
const copyLearnPath = () => {
|
||||||
state.copyModal = false;
|
state.copyModal = false;
|
||||||
state.tableLoading = true;
|
state.tableLoading = true;
|
||||||
api.handleLearnPath({
|
api
|
||||||
routerId: state.copyPathId,
|
.handleLearnPath({
|
||||||
type: 2,
|
routerId: state.copyPathId,
|
||||||
}).then(() => {getLearnPath();})
|
type: 2,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getLearnPath();
|
||||||
|
});
|
||||||
message.success("复制成功");
|
message.success("复制成功");
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1158,30 +1212,30 @@ export default {
|
|||||||
};
|
};
|
||||||
//创建学习路径图
|
//创建学习路径图
|
||||||
const createLearnPath = async () => {
|
const createLearnPath = async () => {
|
||||||
state.confirmLoading = true
|
state.confirmLoading = true;
|
||||||
if (!state.pathName) {
|
if (!state.pathName) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
return message.warning("请输入路径图名称");
|
return message.warning("请输入路径图名称");
|
||||||
}
|
}
|
||||||
if (!state.organizationSelectName) {
|
if (!state.organizationSelectName) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
return message.warning("请选择归属组织");
|
return message.warning("请选择归属组织");
|
||||||
}
|
}
|
||||||
if (!state.pathBg) {
|
if (!state.pathBg) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
return message.warning("请选择背景图");
|
return message.warning("请选择背景图");
|
||||||
}
|
}
|
||||||
if (!state.mobilePicUrl) {
|
if (!state.mobilePicUrl) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
return message.warning("未配置H5背景图,请联系管理员!");
|
return message.warning("未配置H5背景图,请联系管理员!");
|
||||||
}
|
}
|
||||||
if (!state.validate) {
|
if (!state.validate) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
message.warning("路径图名称重复");
|
message.warning("路径图名称重复");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1194,23 +1248,25 @@ export default {
|
|||||||
});
|
});
|
||||||
if (offName) {
|
if (offName) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
return message.warning("项目名称重复,请重新填写");
|
return message.warning("项目名称重复,请重新填写");
|
||||||
}
|
}
|
||||||
api.createLearnPath({
|
api
|
||||||
name: state.pathName,
|
.createLearnPath({
|
||||||
remark: state.pathIntro,
|
name: state.pathName,
|
||||||
status: 0,
|
remark: state.pathIntro,
|
||||||
organizationId: state.organizationSelectId,
|
status: 0,
|
||||||
organizationName: state.organizationSelectName,
|
organizationId: state.organizationSelectId,
|
||||||
picUrl: state.pathBg,
|
organizationName: state.organizationSelectName,
|
||||||
mobilePicUrl: state.mobilePicUrl,
|
picUrl: state.pathBg,
|
||||||
}).then(id => {
|
mobilePicUrl: state.mobilePicUrl,
|
||||||
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.deleteModal = false;
|
||||||
state.tableLoading = true;
|
state.tableLoading = true;
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
api.handleLearnPath({routerId: state.deletePathId, type: -2}).then(() => {getLearnPath()})
|
api
|
||||||
|
.handleLearnPath({ routerId: state.deletePathId, type: -2 })
|
||||||
|
.then(() => {
|
||||||
|
getLearnPath();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//编辑学习路径图
|
//编辑学习路径图
|
||||||
const editLearnPath = async () => {
|
const editLearnPath = async () => {
|
||||||
state.confirmLoading = true
|
state.confirmLoading = true;
|
||||||
if (!state.pathName) {
|
if (!state.pathName) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
return message.warning("请输入路径图名称");
|
return message.warning("请输入路径图名称");
|
||||||
}
|
}
|
||||||
if (!state.organizationSelectName) {
|
if (!state.organizationSelectName) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
return message.warning("请选择归属组织");
|
return message.warning("请选择归属组织");
|
||||||
}
|
}
|
||||||
if (!state.pathBgId) {
|
if (!state.pathBgId) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
return message.warning("请选择背景图");
|
return message.warning("请选择背景图");
|
||||||
}
|
}
|
||||||
if (!state.mobilePicUrl) {
|
if (!state.mobilePicUrl) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
return message.warning("未配置H5背景图,请联系管理员!");
|
return message.warning("未配置H5背景图,请联系管理员!");
|
||||||
}
|
}
|
||||||
if (!state.validate) {
|
if (!state.validate) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
return message.warning("路径图名称重复");
|
return message.warning("路径图名称重复");
|
||||||
}
|
}
|
||||||
// state.pathName = detail.name;
|
// state.pathName = detail.name;
|
||||||
@@ -1308,11 +1368,11 @@ export default {
|
|||||||
});
|
});
|
||||||
if (offName) {
|
if (offName) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
return message.warning("项目名称重复,请重新填写");
|
return message.warning("项目名称重复,请重新填写");
|
||||||
}
|
}
|
||||||
state.out1 = false;
|
state.out1 = false;
|
||||||
state.confirmLoading = false
|
state.confirmLoading = false;
|
||||||
message.success("修改成功");
|
message.success("修改成功");
|
||||||
state.tableLoading = true;
|
state.tableLoading = true;
|
||||||
let obj = {
|
let obj = {
|
||||||
@@ -1325,7 +1385,9 @@ export default {
|
|||||||
organizationId: state.organizationSelectId,
|
organizationId: state.organizationSelectId,
|
||||||
status: 0,
|
status: 0,
|
||||||
};
|
};
|
||||||
api.createLearnPath(obj).then(() => {getLearnPath()})
|
api.createLearnPath(obj).then(() => {
|
||||||
|
getLearnPath();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
//选择状态
|
//选择状态
|
||||||
const selectStatusClassify = (e, v) => {
|
const selectStatusClassify = (e, v) => {
|
||||||
@@ -1452,10 +1514,10 @@ export default {
|
|||||||
);
|
);
|
||||||
function manage(id) {
|
function manage(id) {
|
||||||
// TODO 为了点击顶部面包屑导航返回而存储
|
// TODO 为了点击顶部面包屑导航返回而存储
|
||||||
localStorage.setItem('routerId',id)
|
localStorage.setItem("routerId", id);
|
||||||
router.push({
|
router.push({
|
||||||
path: "/leveladd",
|
path: "/leveladd",
|
||||||
query:{routerId:id}
|
query: { routerId: id },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1463,38 +1525,40 @@ export default {
|
|||||||
// console.log("编辑学习路径图id", id);
|
// console.log("编辑学习路径图id", id);
|
||||||
//获取学习路径详情
|
//获取学习路径详情
|
||||||
api
|
api
|
||||||
.getRouterDetail(id,"draft")
|
.getRouterDetail(id, "draft")
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
console.log("获取学习路径详情成功", res.data.data);
|
console.log("获取学习路径详情成功", res.data.data);
|
||||||
let detail = res.data.data.routerInfo;
|
let detail = res.data.data.routerInfo;
|
||||||
state.pathName = detail.name;
|
state.pathName = detail.name;
|
||||||
state.pathBg = detail.picUrl;
|
state.pathBg = detail.picUrl;
|
||||||
state.mobilePicUrl = detail.mobilePicUrl;
|
state.mobilePicUrl = detail.mobilePicUrl;
|
||||||
state.pathBgId = "";
|
state.pathBgId = "";
|
||||||
state.organizationSelectName = detail.organizationName;
|
state.organizationSelectName = detail.organizationName;
|
||||||
state.organizationSelectId = detail.organizationId;
|
state.organizationSelectId = detail.organizationId;
|
||||||
state.pathIntro = detail.remark;
|
state.pathIntro = detail.remark;
|
||||||
state.editPathId = id;
|
state.editPathId = id;
|
||||||
const imgDict = imgData.value.find((img)=>img.value.split(',')[0] === state.pathBg)
|
const imgDict = imgData.value.find(
|
||||||
if(imgDict){
|
(img) => img.value.split(",")[0] === state.pathBg
|
||||||
state.pathBgId = imgDict.code;
|
);
|
||||||
state.pathBg = imgDict.value.split(',')[0];
|
if (imgDict) {
|
||||||
state.mobilePicUrl = imgDict.value.split(',')[1];
|
state.pathBgId = imgDict.code;
|
||||||
}
|
state.pathBg = imgDict.value.split(",")[0];
|
||||||
|
state.mobilePicUrl = imgDict.value.split(",")[1];
|
||||||
//for (let i = 0; i < arr.length; i++) {
|
|
||||||
// console.log("arr[i].dictValue", arr[i].dictValue, state.pathBg);
|
|
||||||
// if (arr[i].dictValue === state.pathBg) {
|
|
||||||
// state.pathBgId = arr[i].dictCode;
|
|
||||||
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
.catch((err) => {
|
//for (let i = 0; i < arr.length; i++) {
|
||||||
console.log("获取详情失败", err);
|
// console.log("arr[i].dictValue", arr[i].dictValue, state.pathBg);
|
||||||
});
|
// if (arr[i].dictValue === state.pathBg) {
|
||||||
|
// state.pathBgId = arr[i].dictCode;
|
||||||
|
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("获取详情失败", err);
|
||||||
|
});
|
||||||
state.out1 = true;
|
state.out1 = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1541,7 +1605,7 @@ export default {
|
|||||||
showLearnBgMore,
|
showLearnBgMore,
|
||||||
closeLearnBgMore,
|
closeLearnBgMore,
|
||||||
checkPer,
|
checkPer,
|
||||||
getLearnPathInfo
|
getLearnPathInfo,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user