mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
fix
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* @FilePath: /fe-manage/src/api/config.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import { message } from "ant-design-vue";
|
||||
import {message} from "ant-design-vue";
|
||||
import axios from "axios";
|
||||
import router from "@/router";
|
||||
// import { getCookie } from '../api/method'
|
||||
@@ -14,13 +14,13 @@ import router from "@/router";
|
||||
|
||||
// axios.defaults.headers.post["Content-Type"] =
|
||||
// "application/x-www-form-urlencoded";
|
||||
|
||||
export const FILE_UPLOAD_URL = process.env.VUE_APP_BASE_API + '/file/upload'
|
||||
axios.defaults.withCredentials = true;
|
||||
const http = axios.create({
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
timeout: 1000 * 15,
|
||||
// headers: { "Content-Type": "multipart/form-data" },
|
||||
headers: { "Content-Type": "application/json" },
|
||||
headers: {"Content-Type": "application/json"},
|
||||
});
|
||||
|
||||
http.interceptors.request.use(
|
||||
@@ -50,14 +50,14 @@ http.interceptors.response.use(
|
||||
(response) => {
|
||||
// console.log('response', response)
|
||||
const {
|
||||
data: { code, msg },
|
||||
data: {code, msg},
|
||||
} = response;
|
||||
// console.log('code', code)
|
||||
if (code === 0 || code === 200) {
|
||||
return response;
|
||||
} else {
|
||||
if (code === 1000) {
|
||||
process.env.NODE_ENV === 'development' ? router.push({ path: 'login' }) : (window.location.href = process.env.VUE_APP_LOGIN_URL)
|
||||
process.env.NODE_ENV === 'development' ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)
|
||||
}
|
||||
console.log("api %o", msg);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-upload
|
||||
:file-list="files"
|
||||
:action="`${process.env.VUE_APP_BASE_API}/file/upload`"
|
||||
:action="FILE_UPLOAD_URL"
|
||||
:show-upload-list="showUploadList"
|
||||
:multiple="multiple"
|
||||
:before-upload="beforeUpload"
|
||||
@@ -16,6 +16,7 @@
|
||||
<script setup>
|
||||
import {defineProps, defineEmits, defineExpose, ref, watch} from "vue";
|
||||
import {message} from "ant-design-vue";
|
||||
import {FILE_UPLOAD_URL} from "@/api/config";
|
||||
|
||||
const props = defineProps({
|
||||
value: {
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
<div class="btnbox">
|
||||
<a-upload
|
||||
@change="handleChange"
|
||||
:action="`${process.env.VUE_APP_BASE_API}/file/upload`"
|
||||
:action="FILE_UPLOAD_URL"
|
||||
v-model:file-list="fileList"
|
||||
>
|
||||
<button class="xkbtn">上传附件</button>
|
||||
@@ -392,6 +392,7 @@ import { detail } from "../../api/indexCourse";
|
||||
import { queryAppraiseDetailById } from "../../api/indexInvist";
|
||||
import { queryWorkDetailById } from "@/api/indexWork";
|
||||
import { queryExaminationDetailById } from "@/api/indexExam";
|
||||
import {FILE_UPLOAD_URL} from "@/api/config";
|
||||
export default {
|
||||
name: "AddFaceteach",
|
||||
components: {
|
||||
@@ -841,6 +842,7 @@ export default {
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
FILE_UPLOAD_URL,
|
||||
showDrawerSelFacet,
|
||||
showDrawerAddHomework,
|
||||
showDrawerAddTest,
|
||||
|
||||
@@ -45,8 +45,7 @@
|
||||
<span style="margin-right: 3px">附件:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-upload v-model:file-list="fileList" name="file" :action="`${process.env.VUE_APP_BASE_API}/file/upload`"
|
||||
@change="handleChange">
|
||||
<a-upload v-model:file-list="fileList" name="file" :action="FILE_UPLOAD_URL" @change="handleChange">
|
||||
<button class="xkbtn" type="button">上传附件</button>
|
||||
</a-upload>
|
||||
</div>
|
||||
@@ -82,6 +81,7 @@ import {
|
||||
import { ProjectEditTask, RouterEditTask } from "@/api/indexTask";
|
||||
import dayjs from "dayjs";
|
||||
import { addTempTask } from "../../api/indexTaskadd";
|
||||
import { FILE_UPLOAD_URL } from "@/api/config";
|
||||
|
||||
export default {
|
||||
name: "AddHomework",
|
||||
@@ -513,6 +513,7 @@ export default {
|
||||
disabledDate,
|
||||
disabledDateTime,
|
||||
afterVisibleChange,
|
||||
FILE_UPLOAD_URL,
|
||||
closeDrawer,
|
||||
closeDrawer2,
|
||||
handleChange,
|
||||
|
||||
@@ -130,6 +130,26 @@
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 3px">及格线:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="test.passLine"
|
||||
type="number"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
/>
|
||||
|
||||
<span style="color: #999999; margin-left: 8px">分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">考试说明:</span>
|
||||
@@ -147,7 +167,7 @@
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">考试限制:</span>
|
||||
<span style="margin-right: 3px;margin-top: 10px;">考试限制:</span>
|
||||
</div>
|
||||
<div class="kqszbox">
|
||||
<div class="setbox">
|
||||
@@ -227,64 +247,45 @@
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 3px">及格线:</span>
|
||||
<span style="margin-right: 3px">试题排列:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="test.passLine"
|
||||
type="number"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
/>
|
||||
|
||||
<span style="color: #999999; margin-left: 8px">分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">试题排列:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.questionArrangement"
|
||||
>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="1"
|
||||
@click="cloradio4"
|
||||
>试题乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="2"
|
||||
@click="cloradio4"
|
||||
>选项乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="3"
|
||||
@click="cloradio4"
|
||||
>全部乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="4"
|
||||
@click="cloradio4"
|
||||
>不乱序
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<a-radio-group
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.questionArrangement"
|
||||
>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="1"
|
||||
@click="cloradio4"
|
||||
>试题乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="2"
|
||||
@click="cloradio4"
|
||||
>选项乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="3"
|
||||
@click="cloradio4"
|
||||
>全部乱序
|
||||
</a-radio>
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="4"
|
||||
@click="cloradio4"
|
||||
>不乱序
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item" style="height: 20px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
@@ -811,8 +812,7 @@ export default {
|
||||
.setbox {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 24px;
|
||||
|
||||
|
||||
.timerbox {
|
||||
margin-top: 6px;
|
||||
|
||||
@@ -86,45 +86,23 @@ function validateProName() {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.in {
|
||||
|
||||
.pro {
|
||||
.ant-input-affix-wrapper {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 99%;
|
||||
min-width: 0;
|
||||
padding: 4px 8px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-size: 14px;
|
||||
line-height: 1.5715;
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 8px;
|
||||
transition: all 0.3s;
|
||||
display: inline-flex;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.in {
|
||||
.road {
|
||||
.ant-input-affix-wrapper {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 99%;
|
||||
min-width: 0;
|
||||
padding: 0px 8px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
font-size: 14px;
|
||||
line-height: 1.5715;
|
||||
background-color: #fff;
|
||||
background-image: none;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 8px;
|
||||
transition: all 0.3s;
|
||||
display: inline-flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.b_input,
|
||||
.i1_input {
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<template #action="{ record }">
|
||||
<div
|
||||
@click="del(record.id)"
|
||||
style="color: #4ea6ff; font-size: 14px; text-align: center"
|
||||
style="color: #4ea6ff; font-size: 14px; text-align: center;margin-left: 20px;cursor: pointer;"
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
@@ -235,6 +235,7 @@ function getStuList() {
|
||||
|
||||
function reset() {
|
||||
tableParam.value.studentName="";
|
||||
getStuList();
|
||||
}
|
||||
|
||||
function bathDel() {
|
||||
|
||||
@@ -3281,11 +3281,11 @@ const columns7 = [
|
||||
key: "5",
|
||||
align: "center",
|
||||
customRender: ({ record }) => {
|
||||
switch (String(record.source)) {
|
||||
switch (String(record.status)) {
|
||||
case "0":
|
||||
return "待审核";
|
||||
case "1":
|
||||
return "审核通过";
|
||||
case "1":
|
||||
return "待审核";
|
||||
case "2":
|
||||
return "审核拒绝";
|
||||
}
|
||||
@@ -3403,11 +3403,11 @@ export default defineComponent({
|
||||
key: "5",
|
||||
align: "center",
|
||||
customRender: ({ record }) => {
|
||||
switch (String(record.source)) {
|
||||
switch (String(record.status)) {
|
||||
case "0":
|
||||
return "待审核";
|
||||
case "1":
|
||||
return "审核通过";
|
||||
case "1":
|
||||
return "待审核";
|
||||
case "2":
|
||||
return "审核拒绝";
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="inname">路径图名称</div>
|
||||
<div class="in">
|
||||
<div class="in road">
|
||||
<!-- <a-input-->
|
||||
<!-- v-model:value="pathName"-->
|
||||
<!-- maxlength="20"-->
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="tableData"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:loading="tableLoading"
|
||||
:scroll="{ x: 700 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
@@ -845,6 +845,7 @@ export default {
|
||||
},
|
||||
setup() {
|
||||
const state = reactive({
|
||||
tableLoading:false,
|
||||
projectName: null,
|
||||
selectTime: null,
|
||||
sonproject: false,
|
||||
@@ -1671,31 +1672,34 @@ export default {
|
||||
},
|
||||
},
|
||||
]);
|
||||
const getTableDate = () =>
|
||||
api
|
||||
.getProjectList({
|
||||
...state.searchParam,
|
||||
beginTime:
|
||||
state.searchParam.valueDate &&
|
||||
state.searchParam.valueDate.length === 2
|
||||
? dayjs(state.searchParam.valueDate[0]).format("YYYY-MM-DD")
|
||||
const getTableDate = () =>{
|
||||
state.tableLoading = true
|
||||
api.getProjectList({
|
||||
...state.searchParam,
|
||||
beginTime:
|
||||
state.searchParam.valueDate &&
|
||||
state.searchParam.valueDate.length === 2
|
||||
? dayjs(state.searchParam.valueDate[0]).format("YYYY-MM-DD")
|
||||
|
||||
: "",
|
||||
endTime:
|
||||
state.searchParam.valueDate &&
|
||||
state.searchParam.valueDate.length === 2
|
||||
? dayjs(state.searchParam.valueDate[1]).format("YYYY-MM-DD")
|
||||
: "",
|
||||
})
|
||||
.then((res) => {
|
||||
// console.log("搜索", res, state.searchParam);
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
state.tableLoading = false
|
||||
const data = res.data.data.rows;
|
||||
initDataSublist("", data);
|
||||
console.log(data);
|
||||
tableData.value = data;
|
||||
console.log("tableData", tableData);
|
||||
});
|
||||
}
|
||||
|
||||
: "",
|
||||
endTime:
|
||||
state.searchParam.valueDate &&
|
||||
state.searchParam.valueDate.length === 2
|
||||
? dayjs(state.searchParam.valueDate[1]).format("YYYY-MM-DD")
|
||||
: "",
|
||||
})
|
||||
.then((res) => {
|
||||
// console.log("搜索", res, state.searchParam);
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
const data = res.data.data.rows;
|
||||
initDataSublist("", data);
|
||||
console.log(data);
|
||||
tableData.value = data;
|
||||
console.log("tableData", tableData);
|
||||
});
|
||||
|
||||
function initDataSublist(parentName, data) {
|
||||
if (data && data.length) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="tagname">问答题</div>
|
||||
<div class="deleteop" @click="handleTypesDel(3)">
|
||||
<div><img src="../../../assets/images/projectadd/delete.png" /></div>
|
||||
<div class="del_text">删除选项</div>
|
||||
<div class="del_text">删除题目</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
</div>
|
||||
<div class="delete" @click="handleDel">删除</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="name uploadContent">
|
||||
<a-upload
|
||||
v-show="!curItem.imgVal"
|
||||
@@ -43,6 +44,7 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="tagname">多选题</div>
|
||||
<div class="deleteop" @click="handleTypesDel(2)">
|
||||
<div><img src="../../../assets/images/projectadd/delete.png" /></div>
|
||||
<div class="del_text">删除选项</div>
|
||||
<div class="del_text">删除题目</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="tagname">评分题</div>
|
||||
<div class="deleteop" @click="handleTypesDel(4)">
|
||||
<div><img src="../../../assets/images/projectadd/delete.png" /></div>
|
||||
<div class="del_text">删除选项</div>
|
||||
<div class="del_text">删除题目</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="tagname">单选题</div>
|
||||
<div class="deleteop" @click="handleTypesDel(1)">
|
||||
<div><img src="../../../assets/images/projectadd/delete.png" /></div>
|
||||
<div class="del_text">删除选项</div>
|
||||
<div class="del_text">删除题目</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
|
||||
Reference in New Issue
Block a user