mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 13:26:45 +08:00
Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop
This commit is contained in:
21
package-lock.json
generated
21
package-lock.json
generated
@@ -3591,6 +3591,8 @@
|
||||
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.11.0.tgz",
|
||||
"integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
@@ -3602,7 +3604,9 @@
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
||||
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/ajv-keywords": {
|
||||
"version": "3.5.2",
|
||||
@@ -13767,7 +13771,6 @@
|
||||
"integrity": "sha512-yl+5qhpjd8e1G4cMXfORkkBlvtPCIgmRf3IYCWYDKIQ7m+PPa5iTm4feiNmCMD6yGqQWMhhK/7M3oWGL9boKwg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/helper-compilation-targets": "^7.12.16",
|
||||
"@babel/helper-module-imports": "^7.12.13",
|
||||
"@babel/plugin-proposal-class-properties": "^7.12.13",
|
||||
@@ -13780,7 +13783,6 @@
|
||||
"@vue/babel-plugin-jsx": "^1.0.3",
|
||||
"@vue/babel-preset-jsx": "^1.1.2",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"core-js": "^3.8.3",
|
||||
"core-js-compat": "^3.8.3",
|
||||
"semver": "^7.3.4"
|
||||
},
|
||||
@@ -14627,15 +14629,14 @@
|
||||
"resolved": "https://registry.npmmirror.com/ajv-formats/-/ajv-formats-2.1.1.tgz",
|
||||
"integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ajv": "^8.0.0"
|
||||
},
|
||||
"requires": {},
|
||||
"dependencies": {
|
||||
"ajv": {
|
||||
"version": "8.11.0",
|
||||
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.11.0.tgz",
|
||||
"version": "https://registry.npmmirror.com/ajv/-/ajv-8.11.0.tgz",
|
||||
"integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
@@ -14647,7 +14648,9 @@
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
||||
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"peer": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -43,7 +43,7 @@ export default defineComponent({
|
||||
const store = useStore();
|
||||
const isLogin = ref(false);
|
||||
// console.log("router", router.getRoutes(), route);
|
||||
console.log("版本0.13------------");
|
||||
console.log("版本0.17------------");
|
||||
const routes = computed(() => {
|
||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-21 14:32:52
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-12-04 13:27:07
|
||||
* @LastEditTime: 2022-12-05 00:00:40
|
||||
* @FilePath: /fe-manage/src/api/config.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
@@ -24,7 +24,7 @@ const http = axios.create({
|
||||
|
||||
http.interceptors.request.use(
|
||||
(config) => {
|
||||
// console.log('config', config)
|
||||
console.log("config", config);
|
||||
// const token = localStorage.getItem("token");
|
||||
// // const token = getCookie('token')
|
||||
// // console.log('token', token)
|
||||
@@ -34,8 +34,9 @@ http.interceptors.request.use(
|
||||
// console.log("当前请求页面无token,请执行操作!!!");
|
||||
|
||||
// // 此处测试默认配置token
|
||||
// config.headers.token = "123456";
|
||||
// }
|
||||
// config.headers.token =
|
||||
// "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NzAxNTMxMDMsImV4cCI6MTY3MDE2MDMwMywiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.c937b2d3a59cbab2136fdde55fd38f06bdff041212aab0fa6741bc4be41e28a7";
|
||||
// // }
|
||||
return config;
|
||||
},
|
||||
(err) => {
|
||||
@@ -55,7 +56,7 @@ http.interceptors.response.use(
|
||||
return response;
|
||||
} else {
|
||||
if (code === 1000) {
|
||||
// window.open("https://u-pre.boe.com/web/", '_self');
|
||||
window.open("https://u-pre.boe.com/web/", '_self');
|
||||
// window.open("http://111.231.196.214:12013/manage/login", '_self');
|
||||
}
|
||||
console.log("api %o", msg);
|
||||
@@ -64,8 +65,8 @@ http.interceptors.response.use(
|
||||
},
|
||||
function (error) {
|
||||
if (error.message == "timeout of 1ms exceeded") {
|
||||
message.destroy()
|
||||
message.error("请求超时")
|
||||
message.destroy();
|
||||
message.error("请求超时");
|
||||
}
|
||||
console.log("api error %o", error);
|
||||
return Promise.reject(error);
|
||||
|
||||
@@ -115,6 +115,8 @@ export const getMemberInfo = (obj) => http.post('/admin/orgStruct/getMemberInfo'
|
||||
export const getAudienceInfo = (obj) => http.post('/admin/orgStruct/getAudienceInfo', obj)
|
||||
//获取、添加授权(修改版)
|
||||
export const optionAuthPerm = (obj) => http.post('/admin/AuthPerm/optionAuthPerm', obj)
|
||||
//获取学员列表
|
||||
export const getStuList = (obj) => http.post('/admin/orgStruct/getStudentRef', obj)
|
||||
//获取用户登录
|
||||
export const getUser = () => http.post('/admin/CheckUser/login', { withCredentials: true })
|
||||
//公共信息---------------------------------------------------
|
||||
|
||||
@@ -12,3 +12,7 @@ export const RouterEditTask = (obj) => http.post('/admin/router/editTask',obj)
|
||||
export const RouterDeleteTask = (obj) => http.post('/admin/router/deleteTask',obj);
|
||||
// 删除项目任务
|
||||
export const ProjectDeleteTask = (obj) => http.delete('/admin/project/deleteTask',obj);
|
||||
// 判断当前在线课是否已经添加到该路径图下
|
||||
export const IsExistence = (obj) => http.post('/admin/router/queryTaskDoesItExist',obj);
|
||||
// 判断当前在线课是否已经添加到该项目下
|
||||
export const IsExistenceProject = (obj) => http.post('/admin/project/queryTaskDoesItExistForProject',obj);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import http from "./config";
|
||||
import qs from 'qs';
|
||||
|
||||
import qs from "qs";
|
||||
|
||||
/**
|
||||
* 接口传参数方式(get)
|
||||
@@ -42,42 +41,49 @@ import qs from 'qs';
|
||||
// 接口-请求
|
||||
|
||||
//基础票数上传接口
|
||||
export const baseVoteupload = (obj) => http.post('/vote/baseVoteupload', obj, {
|
||||
export const baseVoteupload = (obj) =>
|
||||
http.post("/vote/baseVoteupload", obj, {
|
||||
headers: {
|
||||
'token': '123',
|
||||
'Content-Type': 'multipart/form-data',
|
||||
|
||||
}
|
||||
})
|
||||
token: "123",
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
//创建题干信息接口
|
||||
export const createStemMessage = (obj) => http.post('/vote/createOptionMessage', obj)
|
||||
|
||||
export const createStemMessage = (obj) =>
|
||||
http.post("/vote/createOptionMessage", obj);
|
||||
|
||||
//投票信息创建接口
|
||||
export const createVote = (obj) => http.post('/vote/createVote', obj)
|
||||
export const createVote = (obj) => http.post("/vote/createVote", obj);
|
||||
|
||||
//删除投票信息
|
||||
export const deleteVoteMessage = (obj) => http.post('/vote/deleteVoteMessage', { params: obj })
|
||||
export const deleteVoteMessage = (obj) =>
|
||||
http.post("/vote/deleteVoteMessage", { params: obj });
|
||||
|
||||
//删除题干信息接口
|
||||
export const deleteVoteStem = (voteStemId) => http.post(`/vote/deleteVoteStem?voteStemId=${voteStemId}`)
|
||||
export const deleteVoteStem = (voteStemId) =>
|
||||
http.post(`/vote/deleteVoteStem?voteStemId=${voteStemId}`);
|
||||
|
||||
//删除题选项息接口
|
||||
export const deleteVoteStemOption = (optionId) => http.post(`/vote/deleteVoteStemOption?optionId=${optionId}`)
|
||||
export const deleteVoteStemOption = (optionId) =>
|
||||
http.post(`/vote/deleteVoteStemOption?optionId=${optionId}`);
|
||||
|
||||
//修改投票信息接口
|
||||
export const editVote = (obj) => http.post('/vote/editVote', obj)
|
||||
export const editVote = (obj) => http.post("/vote/editVote", obj);
|
||||
|
||||
//根据题干ID获取题干信息
|
||||
export const queryStemByStemId = (ballotId) => http.post(`/vote/queryStemByStemId?ballotId=${ballotId}`)
|
||||
export const queryStemByStemId = (ballotId) =>
|
||||
http.post(`/vote/queryStemByStemId?ballotId=${ballotId}`);
|
||||
|
||||
//修改题干信息接口
|
||||
export const updateStemMessage = (obj) => http.post('/vote/updateStemMessage', obj);
|
||||
export const updateStemMessage = (obj) =>
|
||||
http.post("/vote/updateStemMessage", obj);
|
||||
|
||||
//上传组件
|
||||
export const fileUp = (obj) => http.post('/file/upload', obj, qs.stringify({ obj }));
|
||||
export const fileUp = (obj) =>
|
||||
http.post("/file/upload", obj, qs.stringify({ obj }));
|
||||
//根据题干ID获取投票任务
|
||||
export const queryVoteDetailById = (voteID) => http.post(`/vote/queryVoteDetailById?voteId=${voteID}`)
|
||||
export const queryVoteDetailById = (voteID) =>
|
||||
http.post(`/vote/queryVoteDetailById?voteId=${voteID}`);
|
||||
|
||||
// 测试方法
|
||||
// import * as api from '../../api/index'
|
||||
|
||||
@@ -408,6 +408,7 @@ export default {
|
||||
ctx.emit("update:addfaceteachVisible", false);
|
||||
localStorage.setItem("stageId", props.chooseStageId);
|
||||
localStorage.setItem("chapterId", props.isactive);
|
||||
state.fileList = []
|
||||
clear();
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
|
||||
637
src/components/drawers/AddGroupMembers.vue
Normal file
637
src/components/drawers/AddGroupMembers.vue
Normal file
@@ -0,0 +1,637 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="AGMembers"
|
||||
class="drawerStyle AddGroupMembers"
|
||||
placement="right"
|
||||
width="70%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<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"
|
||||
/>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="search">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">组员名称:</div>
|
||||
<a-input
|
||||
v-model:value="name"
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="btns">
|
||||
<div class="btn btn1" style="margin-right: 20px" @click="searchStu">
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="resetSearch">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="line">
|
||||
<div class="inline">
|
||||
<div class="left">
|
||||
<div class="img"></div>
|
||||
<div class="text" style="margin-left: 10px">已选择</div>
|
||||
<div class="text2">{{ choosed }}</div>
|
||||
<div class="text">项</div>
|
||||
<div class="text3">列表选项总计:</div>
|
||||
<div class="text4">{{ total }}条</div>
|
||||
</div>
|
||||
<div class="right" @click="clearChooseStu">清空</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableBox" style="margin-top: 20px; margin-bottom: 100px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tablecolumns"
|
||||
:data-source="tabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true"
|
||||
:scroll="{ x: 900 }"
|
||||
@expand="expandTable"
|
||||
:pagination="false"
|
||||
:row-selection="{
|
||||
columnWidth: 30,
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: onSelectChange,
|
||||
}"
|
||||
/>
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
v-if="total > 10"
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="total"
|
||||
class="pagination"
|
||||
@change="changePaginationStu"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="addStu">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive } from "vue";
|
||||
import { getProjStu } from "../../api/indexProjStu";
|
||||
import { toDate } from "../../api/method";
|
||||
import * as api from "../../api/index1";
|
||||
import { message } from "ant-design-vue";
|
||||
// import { message } from "ant-design-vue";
|
||||
export default {
|
||||
name: "AddGroupMembers",
|
||||
props: {
|
||||
AGMembers: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
chooseGroupId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
AGMembers: false,
|
||||
name: null,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: null,
|
||||
tableDataTotal: -1,
|
||||
selectedRowKeys: [],
|
||||
choosed: 0, //勾选的学员总数
|
||||
selectedRows: [], //选择的学员的id值
|
||||
selectedRowStu: [], //选择的学员id和名字数组
|
||||
tabledata: [
|
||||
// {
|
||||
// key: 1,
|
||||
// name: "小李",
|
||||
// bum: "产品部",
|
||||
// gangw: "产品经理",
|
||||
// progress: "20%",
|
||||
// operations: "删除",
|
||||
// },
|
||||
],
|
||||
|
||||
tablecolumns: [
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
width: 40,
|
||||
align: "left",
|
||||
className: "h head",
|
||||
},
|
||||
{
|
||||
title: "部门",
|
||||
dataIndex: "bum",
|
||||
key: "bum",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
{
|
||||
title: "岗位",
|
||||
dataIndex: "gangw",
|
||||
key: "gangw",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
},
|
||||
// {
|
||||
// title: "进度",
|
||||
// dataIndex: "progress",
|
||||
// key: "progress",
|
||||
// width: 60,
|
||||
// align: "center",
|
||||
// className: "h",
|
||||
// },
|
||||
],
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:AGMembers", false);
|
||||
state.selectedRowKeys = [];
|
||||
state.choosed = 0; //勾选的学员总数
|
||||
state.selectedRows = []; //选择的学员的id值
|
||||
state.selectedRowStu = []; //选择的学员id和名字数组
|
||||
};
|
||||
|
||||
//把数据放到state里
|
||||
const getTableDataList = (tableData) => {
|
||||
let data = tableData;
|
||||
let array = [];
|
||||
data.map((value) => {
|
||||
let obj = {
|
||||
key: value.studentId,
|
||||
projectId: value.projectId, //项目id
|
||||
groupId: value.groupId, //小组id
|
||||
group: value.groupName, //小组名
|
||||
studentId: value.studentId, //学生id
|
||||
currentStageId: value.currentStageId, //当前关卡id
|
||||
name: value.name, //用户名
|
||||
bum: value.userInfoBo.deptName, //部门
|
||||
gangw: value.userInfoBo.jobName, //岗位
|
||||
completeStageCnt: value.completeStageCnt, //当前完成阶段数
|
||||
totalStageCnt: value.totalStageCnt, //总阶段数
|
||||
progress: value.completeStageCnt + "/" + value.totalStageCnt,
|
||||
|
||||
stutime: toDate(value.beginStudyTime / 1000, "Y-M-D"), //开始学习时间
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
state.tabledata = array;
|
||||
};
|
||||
//获取学员列表
|
||||
const getStu = (obj) => {
|
||||
let objf = obj || {
|
||||
deptIds: [], //部门
|
||||
groupId: 0,
|
||||
groupName: "",
|
||||
name: state.name,
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
projectId: props.projectId,
|
||||
topFlag: "",
|
||||
};
|
||||
getProjStu(objf).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
console.log(res.data.data, "获取学员列表");
|
||||
// let leng = res.data.data.rows.length;
|
||||
state.total = res.data.data.total;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
// if (leng > 0) {
|
||||
|
||||
// }
|
||||
let arr = res.data.data.rows;
|
||||
getTableDataList(arr);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const afterVisibleChange = (bool) => {
|
||||
if (bool) {
|
||||
getStu();
|
||||
}
|
||||
};
|
||||
//分页
|
||||
const changePaginationStu = (page) => {
|
||||
state.currentPage = page;
|
||||
getStu();
|
||||
};
|
||||
//勾选学员
|
||||
const onSelectChange = (selectedRowKeys, selectedRows) => {
|
||||
console.log("selectedRowKeys changed: ", selectedRowKeys, selectedRows);
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
state.choosed = state.selectedRowKeys.length;
|
||||
state.selectedRows = [];
|
||||
let selectedRowStu = [];
|
||||
selectedRows.map((item) => {
|
||||
console.log(item.studentId);
|
||||
state.selectedRows.push(item.studentId);
|
||||
let obj = {
|
||||
id: item.studentId,
|
||||
name: item.name,
|
||||
};
|
||||
selectedRowStu.push(obj);
|
||||
});
|
||||
state.selectedRowStu = selectedRowStu;
|
||||
};
|
||||
|
||||
//清空所选的学员
|
||||
const clearChooseStu = () => {
|
||||
state.selectedRowKeys = [];
|
||||
state.choosed = 0;
|
||||
};
|
||||
//学员搜索
|
||||
const searchStu = () => {
|
||||
state.currentPage = 1;
|
||||
getStu();
|
||||
};
|
||||
//重置
|
||||
const resetSearch = () => {
|
||||
state.name = null;
|
||||
let obj = {
|
||||
deptIds: [], //部门
|
||||
groupName: "",
|
||||
name: "",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
projectId: props.projectId,
|
||||
topFlag: "",
|
||||
};
|
||||
//重新获取列表
|
||||
getStu(obj);
|
||||
};
|
||||
|
||||
//向小组添加组员
|
||||
const addStu = () => {
|
||||
let obj = {
|
||||
deptList: [],
|
||||
groupList: [],
|
||||
projectGroupId: props.chooseGroupId,
|
||||
projectId: props.projectId,
|
||||
studentList: state.selectedRowStu,
|
||||
};
|
||||
console.log("添加小组学员obj", obj);
|
||||
api
|
||||
.addStudentProject(obj)
|
||||
.then((res) => {
|
||||
console.log("添加小组学员成功", res);
|
||||
message.success("添加成功");
|
||||
|
||||
ctx.emit("getStuPro");
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("添加小组学员失败", err);
|
||||
});
|
||||
};
|
||||
// console.log("chooseGroupId", props.chooseGroupId);
|
||||
return {
|
||||
...toRefs(state),
|
||||
closeDrawer,
|
||||
|
||||
getStu,
|
||||
getTableDataList,
|
||||
afterVisibleChange,
|
||||
changePaginationStu,
|
||||
clearChooseStu,
|
||||
onSelectChange,
|
||||
searchStu,
|
||||
resetSearch,
|
||||
addStu,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.AddGroupMembers {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
//overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
// margin-left: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
// background-color: #bfa;
|
||||
overflow-y: auto;
|
||||
.endtime {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.search {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20px;
|
||||
|
||||
.namecon {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.name {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
// .name {
|
||||
// margin-top: 8px;
|
||||
|
||||
// color: rgba(0, 0, 0, 0.85);
|
||||
// font-size: 14px;
|
||||
// font-weight: 400;
|
||||
// }
|
||||
}
|
||||
|
||||
.btns {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.img1 {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url(../../assets/images/courseManage/search0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.img2 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(../../assets/images/courseManage/reset1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #409eff;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
|
||||
color: #409eff;
|
||||
border: 1px solid #409eff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnss {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.img1 {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url(../../assets/images/courseManage/add0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.img2 {
|
||||
width: 17px;
|
||||
height: 16px;
|
||||
background-image: url(../../assets/images/coursewareManage/export.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.img3 {
|
||||
width: 17px;
|
||||
height: 16px;
|
||||
background-image: url(../../assets/images/projectadd/delete.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #409eff;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
margin-right: 20px;
|
||||
color: #409eff;
|
||||
border: 1px solid #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background-color: #e9f6fe;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #c3e6fc;
|
||||
|
||||
.inline {
|
||||
width: 95%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
// background-color: #bfa;
|
||||
.left {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.img {
|
||||
width: 14px;
|
||||
height: 15px;
|
||||
background-image: url(../../assets/images/leveladd/gan.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #999ba3;
|
||||
}
|
||||
|
||||
.text2 {
|
||||
color: #4ea6ff;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.text3 {
|
||||
color: #999ba3;
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tableBox {
|
||||
.ant-table-selection-column {
|
||||
padding: 0px !important;
|
||||
// padding-left: 45px !important;
|
||||
}
|
||||
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(239, 244, 252, 1) !important;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.ant-table-cell {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
}
|
||||
|
||||
.ant-table-selection-column {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.head {
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.operation {
|
||||
color: rgba(56, 125, 247, 1);
|
||||
cursor: pointer;
|
||||
}
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
.ant-table-tbody > tr > td {
|
||||
border-bottom: 1px solid rgba(240, 244, 254, 1);
|
||||
}
|
||||
.pa {
|
||||
// left: 0;
|
||||
margin-top: 15px;
|
||||
width: 100%;
|
||||
// height: 20px;
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
// position: absolute;
|
||||
// bottom: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
|
||||
.btn1 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
color: #4ea6ff;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-left: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -291,6 +291,7 @@ export default {
|
||||
resetForm();
|
||||
};
|
||||
const closeDrawer2 = () => {
|
||||
ctx.emit("update:edit", false);
|
||||
ctx.emit("update:addhomeworkVisible", false);
|
||||
resetForm();
|
||||
};
|
||||
|
||||
@@ -134,7 +134,7 @@ import * as api from "../../api/indexOnline.js";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
// import { setCookie } from "../../api/method"
|
||||
import { message } from "ant-design-vue";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
import { RouterEditTask, IsExistence, IsExistenceProject } from "@/api/indexTask";
|
||||
import { addTempTask } from "../../api/indexTaskadd";
|
||||
export default {
|
||||
name: "AddOnline",
|
||||
@@ -272,6 +272,7 @@ export default {
|
||||
const onSelectChange = (selectedRowKeys,selectedRows) => {
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
state.addOnlineList = selectedRows;
|
||||
console.log(selectedRowKeys,selectedRows)
|
||||
if( props.edit && selectedRows.length > 0 ){
|
||||
selectedRows.map((value)=>{
|
||||
if(value.courseId == props.EditOnlineId){
|
||||
@@ -311,7 +312,6 @@ export default {
|
||||
}
|
||||
});
|
||||
state.tableData = array;
|
||||
state.tableDataTotal = state.tableData.length
|
||||
};
|
||||
//获取全部在线信息接口
|
||||
const getAllOnlineText = () => {
|
||||
@@ -330,17 +330,80 @@ export default {
|
||||
"sysType3": "",
|
||||
})
|
||||
.then((res) => {
|
||||
let arr = res.data.data;
|
||||
let arr = res.data.data.list;
|
||||
state.tableDataTotal = res.data.data.count
|
||||
if (res.status === 200) {
|
||||
console.log('获取在线课列表数据', res)
|
||||
getTableDate(arr);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err,'请求失败在线');});
|
||||
};
|
||||
|
||||
// 校验当前在线课是否已经添加进来了
|
||||
const isExistence = (id) => {
|
||||
|
||||
console.log({
|
||||
"chapterId": Number(props.isactive),
|
||||
"courseTaskId": Number(id),
|
||||
"routerId": props.routerId,
|
||||
"type": 1
|
||||
})
|
||||
|
||||
IsExistence({
|
||||
"chapterId": Number(props.isactive),
|
||||
"courseTaskId": Number(id),
|
||||
"routerId": props.routerId,
|
||||
"type": 1
|
||||
}).then(res=>{
|
||||
console.log('我是不是已经添加了',res)
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
|
||||
// 判断项目中是否添加当前在线课
|
||||
const IsExistenceProjects = () => {
|
||||
IsExistenceProject({
|
||||
"courseTaskId": props.projectTaskId || 0,
|
||||
"projectId": props.projectId,
|
||||
"stageId": props.chooseStageId || 0,
|
||||
"type": 1
|
||||
}).then(res=>{
|
||||
console.log(res)
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
|
||||
const updateTask = () => {
|
||||
|
||||
|
||||
if(props.isLevel == 1){
|
||||
// isExistence(23)
|
||||
// return
|
||||
// let routerarr = []
|
||||
// console.log('我是要便利的数据1', state.addOnlineList)
|
||||
// state.addOnlineList.map((value) => {
|
||||
// routerarr.push(isExistence(value.courseId))
|
||||
// })
|
||||
// console.log('当前是否已经添加了',routerarr)
|
||||
}
|
||||
|
||||
if(props.isLevel == 2){
|
||||
console.log('我是要便利的数据2', state.addOnlineList)
|
||||
|
||||
}
|
||||
|
||||
if(props.isLevel == 3){
|
||||
console.log('我是要便利的数据3', state.addOnlineList)
|
||||
|
||||
}
|
||||
|
||||
if (props.isLevel == 1) {
|
||||
state.addOnlineList.map((value) => {
|
||||
console.log(value)
|
||||
RouterEditTask({
|
||||
chapterId: Number(props.isactive),
|
||||
courseId: value.num,
|
||||
@@ -445,6 +508,8 @@ export default {
|
||||
updateTask,
|
||||
searchList,
|
||||
resetOnline,
|
||||
isExistence,
|
||||
IsExistenceProjects
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -168,8 +168,7 @@ export default {
|
||||
localStorage.setItem("chapterId", props.isactive);
|
||||
};
|
||||
|
||||
const afterVisibleChange = () => {
|
||||
};
|
||||
const afterVisibleChange = () => {};
|
||||
|
||||
const showDrawer = () => {
|
||||
state.visible = true;
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<div class="text3">列表选项总计:</div>
|
||||
<div class="text4">{{ total }}条</div>
|
||||
</div>
|
||||
<div class="right">清空</div>
|
||||
<div class="right" @click="clearChooseStu">清空</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableBox" style="margin-top: 20px; margin-bottom: 100px">
|
||||
@@ -97,8 +97,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div>
|
||||
<!-- 批量删除的弹窗 -->
|
||||
<a-modal
|
||||
@@ -146,20 +146,30 @@
|
||||
<button class="btn btn2" @click="yesdele">确定</button>
|
||||
</div>
|
||||
</a-modal>
|
||||
<stu-add v-model:Stuvisible="Stuvisible" />
|
||||
<!-- <stu-add v-model:Stuvisible="Stuvisible" /> -->
|
||||
<add-group-members
|
||||
v-model:AGMembers="Stuvisible"
|
||||
:chooseGroupId="chooseGroupId"
|
||||
:projectId="projectId"
|
||||
@getStuPro="getStu"
|
||||
/>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive } from "vue";
|
||||
import StuAdd from "./StuAdd.vue";
|
||||
// import StuAdd from "./StuAdd.vue";
|
||||
import { getProjStu, deleteStu } from "../../api/indexProjStu";
|
||||
import { toDate } from "../../api/method";
|
||||
import { message } from "ant-design-vue";
|
||||
import AddGroupMembers from "./AddGroupMembers.vue";
|
||||
export default {
|
||||
name: "MemberList",
|
||||
components: { StuAdd },
|
||||
components: {
|
||||
// StuAdd,
|
||||
AddGroupMembers,
|
||||
},
|
||||
props: {
|
||||
Lvisible: {
|
||||
type: Boolean,
|
||||
@@ -178,12 +188,15 @@ export default {
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
Stuvisible: false,
|
||||
// chooseGroupId: props.chooseGroupId,
|
||||
// projectId: props.projectId,
|
||||
name: null,
|
||||
showmodal: false,
|
||||
closable: false, //modal右上角的关闭按钮
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: null,
|
||||
tableDataTotal: -1,
|
||||
selectedRowKeys: [],
|
||||
choosed: 0, //勾选的学员总数
|
||||
selectedRows: [], //选择的学员的id值
|
||||
@@ -257,6 +270,8 @@ export default {
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:Lvisible", false);
|
||||
state.tabledata = [];
|
||||
console.log("tabledata", state.tabledata);
|
||||
};
|
||||
const showModal = () => {
|
||||
if (state.selectedRows.length == 0) {
|
||||
@@ -290,6 +305,7 @@ export default {
|
||||
};
|
||||
const showStuAdd = () => {
|
||||
state.Stuvisible = true;
|
||||
// console.log("单击");
|
||||
};
|
||||
//把数据放到state里
|
||||
const getTableDataList = (tableData) => {
|
||||
@@ -326,21 +342,30 @@ export default {
|
||||
pageSize: 10,
|
||||
projectId: props.projectId,
|
||||
topFlag: "",
|
||||
groupId: 10, //暂时写死
|
||||
groupId: props.chooseGroupId, //暂时写死
|
||||
};
|
||||
state.tableDataTotal = -1;
|
||||
getProjStu(objf).then((res) => {
|
||||
console.log(res.data.data, "获取学员列表");
|
||||
let leng = res.data.data.rows.length;
|
||||
if (res.data.code === 200) {
|
||||
state.total = res.data.data.total;
|
||||
if (leng > 0) {
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
let arr = res.data.data.rows;
|
||||
getTableDataList(arr);
|
||||
}
|
||||
// let leng = res.data.data.rows.length;
|
||||
|
||||
// state.tableDataTotal = res.data.data.total;
|
||||
// if (leng > 0) {
|
||||
|
||||
// }
|
||||
});
|
||||
};
|
||||
|
||||
const afterVisibleChange = () => {
|
||||
const afterVisibleChange = (bool) => {
|
||||
if (bool) {
|
||||
getStu();
|
||||
}
|
||||
};
|
||||
//分页
|
||||
const changePaginationStu = (page) => {
|
||||
|
||||
@@ -583,6 +583,7 @@ import {
|
||||
// batchLoadList,
|
||||
} from "../../utils/utils";
|
||||
import * as api from "../../api/index1";
|
||||
import {getStuList} from "../../api/index1";
|
||||
|
||||
export default {
|
||||
name: "ProjCheckShip",
|
||||
@@ -603,6 +604,11 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
//1 审核 2添加学员
|
||||
type: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
@@ -611,7 +617,7 @@ export default {
|
||||
//快速选人
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 100,
|
||||
tableDataTotal: 0,
|
||||
nameSearch: "", //搜索名称
|
||||
loading: false,
|
||||
//受众
|
||||
@@ -805,7 +811,7 @@ export default {
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
if (bool) {
|
||||
optionAuthPerm();
|
||||
props.type === 1 ? optionAuthPerm() : getStuentList()
|
||||
}
|
||||
};
|
||||
//获取组织树
|
||||
@@ -822,7 +828,7 @@ export default {
|
||||
// };
|
||||
onMounted(() => {
|
||||
window.addEventListener("resize", getClientHeight, false);
|
||||
state.tabledata = store.state.memberInitInfo;
|
||||
// state.tabledata = store.state.memberInitInfo;
|
||||
});
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener("resize", getClientHeight, false);
|
||||
@@ -898,10 +904,14 @@ export default {
|
||||
console.log("choosepeople : ", state.choosepeople);
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
const se = state.studentList.map(e => e.id).join(',') || ''
|
||||
const addItem = item.filter(e => (e && !se.includes(e.id + ',')))
|
||||
const addItem = item.filter(e => (e && !se.includes(e.id + '')))
|
||||
addItem.forEach(e => {
|
||||
e.name = e.realName
|
||||
})
|
||||
const selectStr = selectedRowKeys.join(',')
|
||||
console.log(selectStr)
|
||||
state.studentList = state.studentList.filter(e => selectStr.includes(e.id + ''))
|
||||
console.log(state.studentList)
|
||||
state.choosepeople = [...addItem.reverse(), ...state.studentList];
|
||||
selectedsHeight();
|
||||
// if (selectedRowKeys.length > 0 && item.length > 0) {
|
||||
@@ -1331,33 +1341,18 @@ export default {
|
||||
ctx.emit("update:addAuthList", state.selectAllArr);
|
||||
closeDrawer();
|
||||
};
|
||||
//获取授权 坐回显
|
||||
const optionAuthPerm = () => {
|
||||
let obj = {
|
||||
keyWord: "",
|
||||
type:
|
||||
props.classify === "learnPath"
|
||||
? 1
|
||||
: props.classify === "project"
|
||||
? 2
|
||||
: props.classify === "course"
|
||||
? 3
|
||||
: null,
|
||||
tag: props.authClassify === 1 ? 3 : props.authClassify === 2 ? 4 : "",
|
||||
opt: 1,
|
||||
//获取学员列表
|
||||
const getStuentList = () => {
|
||||
getStuList({
|
||||
refType: {learnPath: 1, project: 2, course: 3, addstudent: 2}[props.classify],
|
||||
refId: props.selectProjectId,
|
||||
pageNo: 0,
|
||||
pageSize: 0,
|
||||
deptList: [],
|
||||
groupList: [],
|
||||
studentList: [],
|
||||
};
|
||||
console.log("获取权限名单obj", obj);
|
||||
api
|
||||
.optionAuthPerm(obj)
|
||||
.then((res) => {
|
||||
// console.log("获取权限名单成功", res);
|
||||
if (res.data.code === 200) {
|
||||
extId: 0
|
||||
}).then(res => {
|
||||
initResp(res)
|
||||
})
|
||||
}
|
||||
|
||||
function initResp(res) {
|
||||
let studentArr = res.data.data.studentList;
|
||||
state.studentList = res.data.data.studentList;
|
||||
state.choosepeople = res.data.data.studentList;
|
||||
@@ -1386,10 +1381,33 @@ export default {
|
||||
state.relationpeople = relationpeople;
|
||||
console.log("获取权限名单成功", res);
|
||||
}
|
||||
|
||||
//获取授权 坐回显
|
||||
const optionAuthPerm = () => {
|
||||
let obj = {
|
||||
keyWord: "",
|
||||
type:
|
||||
props.classify === "learnPath"
|
||||
? 1
|
||||
: props.classify === "project"
|
||||
? 2
|
||||
: props.classify === "course"
|
||||
? 3
|
||||
: null,
|
||||
tag: props.authClassify === 1 ? 3 : props.authClassify === 2 ? 4 : "",
|
||||
opt: 1,
|
||||
refId: props.selectProjectId,
|
||||
pageNo: 0,
|
||||
pageSize: 0,
|
||||
deptList: [],
|
||||
groupList: [],
|
||||
studentList: [],
|
||||
};
|
||||
console.log("获取权限名单obj", obj);
|
||||
api.optionAuthPerm(obj).then((res) => {
|
||||
initResp(res)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取权限名单失败", err);
|
||||
});
|
||||
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
|
||||
@@ -1,49 +1,76 @@
|
||||
<template>
|
||||
<a-drawer :visible="addvoteVisible" class="drawerStyle addvoteDrawer" width="80%" title="添加投票" placement="right"
|
||||
@after-visible-change="afterVisibleChange">
|
||||
<a-drawer
|
||||
:visible="addvoteVisible"
|
||||
class="drawerStyle addvoteDrawer"
|
||||
width="80%"
|
||||
title="添加投票"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div v-if="edit" class="headerTitle">编辑投票</div>
|
||||
<div v-else class="headerTitle">添加投票</div>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer" />
|
||||
<div v-if="edit" class="headerTitle">编辑投票任务</div>
|
||||
<div v-else class="headerTitle">添加投票任务</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="main_left">
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span style="margin-right: 3px">任务名称:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input v-model:value="inputV1" style="width: 424px; height: 32px" placeholder="请输入投票名称"
|
||||
maxlength="20" />
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入投票名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span>创建投票:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<button class="xkbtn" @click="showDrawerCreVote">
|
||||
{{ ballotId ? "编辑" : "添加" }}投票
|
||||
|
||||
{{ ballotId ? "编辑" : "创建" }}投票
|
||||
</button>
|
||||
<div v-if="ballotId > 0">
|
||||
<a-tag closable color="processing" @close="log">
|
||||
<span style="font-size:14px;line-height: 33px;">删除投票</span>
|
||||
<span style="font-size: 14px; line-height: 33px">
|
||||
删除投票
|
||||
</span>
|
||||
</a-tag>
|
||||
</div>
|
||||
<div>
|
||||
<CreateVote v-model:createVoteVisible="createVoteVisible" v-model:ballotId="ballotId"
|
||||
v-model:editChild="editChild" />
|
||||
<CreateVote
|
||||
v-model:createVoteVisible="createVoteVisible"
|
||||
v-model:ballotId="ballotId"
|
||||
v-model:editChild="editChild"
|
||||
/>
|
||||
</div>
|
||||
<button class="xkbtn" :style="{ display: creVote ? 'block' : 'none' }" @click="showDrawerCreVote">
|
||||
<button
|
||||
class="xkbtn"
|
||||
:style="{ display: creVote ? 'block' : 'none' }"
|
||||
@click="showDrawerCreVote"
|
||||
>
|
||||
编辑投票
|
||||
</button>
|
||||
<div :style="{ display: creVote ? 'block' : 'none' }">
|
||||
@@ -56,7 +83,11 @@
|
||||
|
||||
<!-- 创建投票侧弹窗 -->
|
||||
<div>
|
||||
<create-vote v-model:crevoteVisible="crevotevisible" @getData="getStemId" v-model:ballotId="ballotId" />
|
||||
<create-vote
|
||||
v-model:crevoteVisible="crevotevisible"
|
||||
@getData="getStemId"
|
||||
v-model:ballotId="ballotId"
|
||||
/>
|
||||
</div>
|
||||
<!-- 创建投票侧弹窗 -->
|
||||
</div>
|
||||
@@ -65,7 +96,11 @@
|
||||
<span style="margin-right: 3px">起止时间:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-range-picker style="width: 424px" v-model:value="time" :placeholder="[' 开始时间', ' 结束时间']" />
|
||||
<a-range-picker
|
||||
style="width: 424px"
|
||||
v-model:value="time"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
@@ -73,12 +108,23 @@
|
||||
<span style="margin-right: 3px">基础投票数:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-upload @change="handleChange" :before-upload="beforeUpload" :multiple="true" :max-count="1"
|
||||
action="/manageApi/vote/baseVoteupload" v-model:file-list="fileList">
|
||||
<button class="xkbtn">点击上传</button></a-upload>
|
||||
<div v-if="voteCount > 0"><a-tag color="processing"> <span style="font-size:14px;line-height: 33px;">{{
|
||||
voteCount
|
||||
}}票</span></a-tag></div>
|
||||
<a-upload
|
||||
@change="handleChange"
|
||||
:before-upload="beforeUpload"
|
||||
:multiple="true"
|
||||
:max-count="1"
|
||||
action="/manageApi/vote/baseVoteupload"
|
||||
v-model:file-list="fileList"
|
||||
>
|
||||
<button class="xkbtn">点击上传</button></a-upload
|
||||
>
|
||||
<div v-if="voteCount > 0">
|
||||
<a-tag color="processing">
|
||||
<span style="font-size: 14px; line-height: 33px">
|
||||
{{ voteCount }}票
|
||||
</span>
|
||||
</a-tag>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item" style="margin-top: -25px">
|
||||
@@ -92,7 +138,12 @@
|
||||
<span style="margin-right: 3px">投票说明:</span>
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea v-model:value="textV1" placeholder="请输入投票说明" allow-clear maxlength="150" />
|
||||
<a-textarea
|
||||
v-model:value="textV1"
|
||||
placeholder="请输入投票说明"
|
||||
allow-clear
|
||||
maxlength="150"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,8 +168,7 @@ import { addTempTask } from "../../api/indexTaskadd";
|
||||
export default {
|
||||
name: "AddVote",
|
||||
components: {
|
||||
CreateVote
|
||||
|
||||
CreateVote,
|
||||
},
|
||||
props: {
|
||||
addvoteVisible: {
|
||||
@@ -145,11 +195,13 @@ export default {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
isLevel: { // 是否是关卡页面触发
|
||||
isLevel: {
|
||||
// 是否是关卡页面触发
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectTaskId: { // 要编辑的projectId
|
||||
projectTaskId: {
|
||||
// 要编辑的projectId
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
@@ -164,9 +216,7 @@ export default {
|
||||
projectTemplateId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
@@ -190,14 +240,13 @@ export default {
|
||||
fileList: [],
|
||||
voteCount: null,
|
||||
projectTemplateId: null,
|
||||
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
state.inputV1 = "",
|
||||
state.textV1 = "",
|
||||
state.time = undefined,
|
||||
state.basevote = "",
|
||||
state.ballotId = "",
|
||||
(state.inputV1 = ""),
|
||||
(state.textV1 = ""),
|
||||
(state.time = undefined),
|
||||
(state.basevote = ""),
|
||||
(state.ballotId = ""),
|
||||
ctx.emit("update:addvoteVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
};
|
||||
@@ -207,38 +256,33 @@ export default {
|
||||
}
|
||||
state.projectTemplateId = props.projectTemplateId;
|
||||
console.log("projectTemplateId visible====", state.projectTemplateId);
|
||||
|
||||
};
|
||||
|
||||
|
||||
const showDrawerCreVote = () => {
|
||||
state.createVoteVisible = true;
|
||||
state.editChild = props.edit;
|
||||
|
||||
|
||||
};
|
||||
|
||||
// 限制文件格式上传
|
||||
const beforeUpload = (obj) => {
|
||||
console.log(obj)
|
||||
}
|
||||
console.log(obj);
|
||||
};
|
||||
|
||||
const handleChange = info => {
|
||||
console.log(info.file.type, info.file.type.indexOf('sheet'))
|
||||
if (info.file.type.indexOf('sheet') == -1) {
|
||||
message.destroy()
|
||||
message.error("请上传正确的文件格式")
|
||||
const handleChange = (info) => {
|
||||
console.log(info.file.type, info.file.type.indexOf("sheet"));
|
||||
if (info.file.type.indexOf("sheet") == -1) {
|
||||
message.destroy();
|
||||
message.error("请上传正确的文件格式");
|
||||
|
||||
console.log(state.fileList)
|
||||
console.log(state.fileList);
|
||||
|
||||
state.fileList = []
|
||||
return
|
||||
state.fileList = [];
|
||||
return;
|
||||
}
|
||||
|
||||
let resFileList = [...info.fileList];
|
||||
|
||||
|
||||
resFileList.map(file => {
|
||||
resFileList.map((file) => {
|
||||
if (file.response) {
|
||||
// Component will show file.url as link
|
||||
file.url = file.response.url;
|
||||
@@ -246,26 +290,23 @@ export default {
|
||||
console.log("file========", file.response);
|
||||
state.voteCount = file.response.data;
|
||||
}
|
||||
|
||||
});
|
||||
//fileList.value = resFileList;
|
||||
};
|
||||
|
||||
//删除题干信息接口
|
||||
const dleVoteStem = () => {
|
||||
api.deleteVoteStem({ voteStemId: state.ballotId })
|
||||
.then(() => {
|
||||
message.success('删除题干信息成功')
|
||||
|
||||
})
|
||||
}
|
||||
api.deleteVoteStem({ voteStemId: state.ballotId }).then(() => {
|
||||
message.success("删除题干信息成功");
|
||||
});
|
||||
};
|
||||
|
||||
//根据投票id获取投票信息
|
||||
const queryVoteInfo = () => {
|
||||
|
||||
api.queryVoteDetailById(props.EditVoteId)
|
||||
api
|
||||
.queryVoteDetailById(props.EditVoteId)
|
||||
.then((res) => {
|
||||
console.log('获取投票信息成功', res);
|
||||
console.log("获取投票信息成功", res);
|
||||
state.inputV1 = res.data.data.voteName;
|
||||
state.textV1 = res.data.data.voteExplain;
|
||||
state.baseVote = res.data.data.baseVote;
|
||||
@@ -277,11 +318,9 @@ export default {
|
||||
];
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log('获取投票信息失败', err);
|
||||
console.log("获取投票信息失败", err);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
const updateToTask = (res) => {
|
||||
console.log("props.isLevel=====", props.isLevel);
|
||||
if (props.isLevel == 1) {
|
||||
@@ -319,7 +358,6 @@ export default {
|
||||
////message.error(`${props.edit ? '编辑' : '新增'}阶段任务失败`)
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
|
||||
addTempTask({
|
||||
courseId: res.data.data.voteId,
|
||||
name: res.data.data.voteName,
|
||||
@@ -336,7 +374,7 @@ export default {
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
//修改投票信息接口
|
||||
const updateVoteInfo = () => {
|
||||
if (!state.inputV1) {
|
||||
@@ -364,8 +402,7 @@ export default {
|
||||
ballotId: state.ballotId,
|
||||
baseVote: state.basevote,
|
||||
voteExplain: state.textV1,
|
||||
|
||||
}
|
||||
};
|
||||
if (props.edit) {
|
||||
api
|
||||
.editVote(obj)
|
||||
@@ -374,12 +411,12 @@ export default {
|
||||
await updateToTask(res);
|
||||
closeDrawer();
|
||||
message.destroy();
|
||||
message.success("修改投票信息成功")
|
||||
message.success("修改投票信息成功");
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("修改投票信息失败")
|
||||
})
|
||||
message.error("修改投票信息失败");
|
||||
});
|
||||
} else {
|
||||
api
|
||||
.createVote(obj)
|
||||
@@ -387,22 +424,21 @@ export default {
|
||||
await updateToTask(res);
|
||||
closeDrawer();
|
||||
message.destroy();
|
||||
message.success("创建投票信息成功")
|
||||
message.success("创建投票信息成功");
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("创建投票信息失败")
|
||||
})
|
||||
}
|
||||
|
||||
message.error("创建投票信息失败");
|
||||
});
|
||||
}
|
||||
};
|
||||
const queryStem = () => {
|
||||
state.addStemVisible = true;
|
||||
};
|
||||
const closeStem = () => {
|
||||
state.addStemVisible = false;
|
||||
};
|
||||
const log = e => {
|
||||
const log = (e) => {
|
||||
state.ballotId = null;
|
||||
console.log(e);
|
||||
};
|
||||
@@ -450,8 +486,10 @@ export default {
|
||||
position: absolute;
|
||||
width: calc(100%);
|
||||
height: 40px;
|
||||
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%);
|
||||
background: linear-gradient(
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.del_main {
|
||||
|
||||
626
src/components/vote/CreateVote copy.vue
Normal file
626
src/components/vote/CreateVote copy.vue
Normal file
@@ -0,0 +1,626 @@
|
||||
<!-- 评估管理-创建评估页面 -->
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="createVoteVisible"
|
||||
class="drawerStyle createvoteDrawer"
|
||||
width="100%"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="researchadd">
|
||||
<div class="header">
|
||||
<div class="headerTitle">创建投票</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="main_left">
|
||||
<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="ballotName"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入任务名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
</div>
|
||||
<span>创建题干:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<button class="xkbtn" @click="handleTypes">添加题干</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 创建投票侧弹窗 -->
|
||||
</div>
|
||||
|
||||
<div v-for="(item, index) in allFormsData" :key="index">
|
||||
<VoteQuestion
|
||||
v-model:info="information"
|
||||
:item="item"
|
||||
:optionId="optionId"
|
||||
@delOption="delOption"
|
||||
@del="handleDel"
|
||||
@edits="edits"
|
||||
@addOption="addOption"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<div class="btn">
|
||||
<a-button
|
||||
type="primary"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
background-color: #409eff;
|
||||
"
|
||||
@click="handleSave"
|
||||
>
|
||||
保存
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
ghost
|
||||
style="
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
margin-left: 14px;
|
||||
border-radius: 8px;
|
||||
"
|
||||
@click="handleAllCancel"
|
||||
>
|
||||
取消
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
// import { createResearch } from "../../api/indexResearch";
|
||||
import VoteQuestion from "./VoteQuestion.vue";
|
||||
|
||||
import {
|
||||
// sortBy,
|
||||
traverseArr,
|
||||
//filterCommon,
|
||||
// deepCloneFilterString,
|
||||
} from "../../utils/utils";
|
||||
|
||||
//import store from "@/store";
|
||||
import * as api from "@/api/indexVote";
|
||||
//import { useRouter } from "vue-router";
|
||||
import {} from "@/api/indexResearch";
|
||||
|
||||
//import { message } from "ant-design-vue";
|
||||
|
||||
export default {
|
||||
name: "CreateVote",
|
||||
components: {
|
||||
VoteQuestion,
|
||||
},
|
||||
props: {
|
||||
createVoteVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
ballotId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
editChild: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
ballotId: "",
|
||||
ballotName: "",
|
||||
allFormsData: [],
|
||||
allFormsData1: [],
|
||||
});
|
||||
// const router = useRouter();
|
||||
const afterVisibleChange = () => {
|
||||
if (props.ballotId) {
|
||||
getInfoDate();
|
||||
} else {
|
||||
handleTypes();
|
||||
}
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:createVoteVisible", false);
|
||||
ctx.emit("update:ballotId", state.ballotId);
|
||||
handleAllCancel();
|
||||
};
|
||||
// 详情
|
||||
const getInfoDate = async () => {
|
||||
console.log("props.editChild=====", props.editChild);
|
||||
if (props.ballotId) {
|
||||
console.log("props.editChild2=====", props.editChild);
|
||||
let res = await api.queryStemByStemId(props.ballotId).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
return res.data.data;
|
||||
}
|
||||
});
|
||||
console.log("res====", res);
|
||||
state.ballotName = res.ballotId;
|
||||
// let renderArr = [...res];
|
||||
// sortBy(renderArr, "orderNumber"); //序号
|
||||
state.allFormsData = parseData(res); //类型
|
||||
state.allFormsData1 = parseData(res); //类型
|
||||
|
||||
console.log(state.allFormsData);
|
||||
}
|
||||
};
|
||||
|
||||
// 转换成前端格式
|
||||
const parseData = (arr) => {
|
||||
const resultArr = [];
|
||||
state.ballotId = arr.ballotId;
|
||||
state.ballotName = arr.ballotName;
|
||||
|
||||
console.log("arr.voteStemVoList=====", arr.voteStemVoList);
|
||||
arr.voteStemVoList.forEach((item) => {
|
||||
let obj = {};
|
||||
let restList = traverseArr(item.optionDetailList, {
|
||||
inputVal: "optionName",
|
||||
imgVal: "optionPictureAddress",
|
||||
optionId: "optionId",
|
||||
voteStemId: "voteStemId",
|
||||
stem: "stem",
|
||||
}).map((itm, idx) => {
|
||||
itm.id = idx + 1;
|
||||
return itm;
|
||||
});
|
||||
|
||||
obj = {
|
||||
voteStemId: item.voteStemId,
|
||||
valueSingle: item.voteStemName,
|
||||
singleList: restList,
|
||||
};
|
||||
resultArr.push(obj);
|
||||
});
|
||||
resultArr.map((itm, idx) => {
|
||||
itm.id = idx + 1;
|
||||
return itm;
|
||||
});
|
||||
return resultArr;
|
||||
};
|
||||
|
||||
// 转换成后端格式
|
||||
const restData = (arr) => {
|
||||
const resultArr = [];
|
||||
arr.forEach((item) => {
|
||||
let obj = {};
|
||||
console.log("item=======", item);
|
||||
// if (item[typeKey] === 1) {
|
||||
let restList = traverseArr(item.singleList, {
|
||||
optionName: "inputVal",
|
||||
optionPictureAddress: "imgVal",
|
||||
optionId: "optionId",
|
||||
voteStemId: "voteStemId",
|
||||
stem: "stem",
|
||||
}).map((itm, idx) => {
|
||||
itm.optionOrderNum = idx + 1;
|
||||
return itm;
|
||||
});
|
||||
restList.forEach((item) => {
|
||||
item.optionId = item.optionId ? item.optionId : "";
|
||||
});
|
||||
|
||||
obj = {
|
||||
voteStemName: item.valueSingle,
|
||||
optionDetailList: restList,
|
||||
voteStemId: item.voteStemId,
|
||||
};
|
||||
resultArr.push(obj);
|
||||
// }
|
||||
console.log("resultArr=======", resultArr);
|
||||
});
|
||||
resultArr.map((itm, idx) => {
|
||||
itm.orderNumber = idx + 1;
|
||||
return itm;
|
||||
});
|
||||
return resultArr;
|
||||
};
|
||||
|
||||
// 解散传值
|
||||
const parseItem = (arrr) => {
|
||||
// const filterComObj = filterCommon(arr, "questionType");
|
||||
let resultObj = {};
|
||||
// for (let key in filterComObj) {
|
||||
// if (key === "1") {
|
||||
// let arrSingle = arrr
|
||||
//filterComObj[key];
|
||||
console.log("arrr======", arrr);
|
||||
/*
|
||||
let arr = [];
|
||||
arrSingle.forEach((item) => {
|
||||
console.log("item======",item);
|
||||
if (item.singleList.length) {
|
||||
item.singleList.forEach((itm) => {
|
||||
arr.push({
|
||||
...itm,
|
||||
optionName: item.optionName,
|
||||
optionOrderNum: item.optionOrderNum,
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
});*/
|
||||
resultObj.voteStemDtoList = arrr;
|
||||
// }
|
||||
console.log("resultObj======", resultObj);
|
||||
// }
|
||||
return resultObj;
|
||||
};
|
||||
|
||||
const handleTypes = () => {
|
||||
let obj = {
|
||||
id: state.allFormsData.length,
|
||||
valueSingle: "",
|
||||
singleList: [
|
||||
{
|
||||
id: 1,
|
||||
inputVal: "",
|
||||
imgVal: "",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
inputVal: "",
|
||||
imgVal: "",
|
||||
},
|
||||
],
|
||||
};
|
||||
state.allFormsData.push(obj);
|
||||
state.allFormsData1.push(obj);
|
||||
};
|
||||
|
||||
const handleDel = ({ id }) => {
|
||||
console.log("1234523432434234234", id, state.allFormsData);
|
||||
|
||||
state.allFormsData.forEach((item, index) => {
|
||||
if (item.id === id) {
|
||||
console.log("oooooo", item);
|
||||
state.allFormsData.splice(index, 1);
|
||||
}
|
||||
});
|
||||
|
||||
// state.allFormsData.map((item, index) => {
|
||||
// item.id = index + 1;
|
||||
// return item;
|
||||
// });
|
||||
|
||||
// orderNumber: curItem.orderNumber,
|
||||
};
|
||||
|
||||
const delOption = (data) => {
|
||||
console.log("datadatadatadatadata", data, state.allFormsData);
|
||||
state.allFormsData.forEach((item, index) => {
|
||||
if (item.voteStemId === data.value.voteStemId) {
|
||||
state.allFormsData[index].singleList.forEach((ii, nn) => {
|
||||
if (ii.id == data.value.id) {
|
||||
console.log(
|
||||
1212121212,
|
||||
state.allFormsData[index].singleList[nn],
|
||||
nn
|
||||
);
|
||||
state.allFormsData[index].singleList.splice(nn, 1);
|
||||
console.log("12", state.allFormsData);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
state.allFormsData1.forEach((item, index) => {
|
||||
if (item.voteStemId === data.value.voteStemId) {
|
||||
state.allFormsData1[index].singleList.forEach((ii, nn) => {
|
||||
if (ii.id == data.value.id) {
|
||||
console.log(
|
||||
1212121212,
|
||||
state.allFormsData1[index].singleList[nn],
|
||||
nn
|
||||
);
|
||||
state.allFormsData1[index].singleList.splice(nn, 1);
|
||||
console.log("33", state.allFormsData1);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const edits = (data) => {
|
||||
console.log(
|
||||
"我传递过来了吗---111",
|
||||
data,
|
||||
data.value.id,
|
||||
state.allFormsData1
|
||||
);
|
||||
|
||||
state.allFormsData1.forEach((item, index) => {
|
||||
if (item.voteStemId === data.value.voteStemId) {
|
||||
item.singleList.forEach((ii, nn) => {
|
||||
if (ii.id === data.value.id) {
|
||||
// ii.optionName = data.value.inputVal
|
||||
state.allFormsData1[index].singleList[nn].inputVal =
|
||||
data.value.inputVal;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
console.log("123-456-789", state.allFormsData1);
|
||||
};
|
||||
|
||||
// 增加选项
|
||||
const addOption = (data) => {
|
||||
console.log(data);
|
||||
state.allFormsData1.forEach((item, index) => {
|
||||
if (item.voteStemId === data.value.voteStemId) {
|
||||
state.allFormsData1[index].singleList = data.value.singleList;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const handleSave = () => {
|
||||
let resultPost = {};
|
||||
|
||||
let filterData = parseItem(restData(state.allFormsData1, "type"));
|
||||
|
||||
console.log("filterData==111", filterData);
|
||||
|
||||
if (!state.ballotName) {
|
||||
return message.warning("请输入投票名称");
|
||||
}
|
||||
// 校验s
|
||||
|
||||
// 校验
|
||||
if (!checkVal(filterData)) {
|
||||
return false;
|
||||
}
|
||||
// checkVal(filterData);
|
||||
console.log(12121212);
|
||||
console.log(filterData);
|
||||
console.log("111111222223333----0000", state.ballotId);
|
||||
if (state.ballotId) {
|
||||
resultPost = {
|
||||
ballotId: state.ballotId,
|
||||
ballotName: state.ballotName,
|
||||
...filterData,
|
||||
};
|
||||
/*
|
||||
resultPost = deepCloneFilterString(resultPost, [
|
||||
"assessmentMaxScore",
|
||||
"assessmentMinScore",
|
||||
]);*/
|
||||
console.log(1212334);
|
||||
console.log(resultPost);
|
||||
api.updateStemMessage(resultPost).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
state.ballotId = res.data.data.ballotId;
|
||||
console.log("res.data.data==============", res.data.data);
|
||||
console.log("res.state.ballotId==============", state.ballotId);
|
||||
message.success("编辑成功");
|
||||
closeDrawer();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
resultPost = {
|
||||
ballotName: state.ballotName,
|
||||
...filterData,
|
||||
};
|
||||
/*
|
||||
resultPost = deepCloneFilterString(resultPost, [
|
||||
"assessmentMaxScore",
|
||||
"assessmentMinScore",
|
||||
]);*/
|
||||
|
||||
console.log("=========", resultPost);
|
||||
api.createStemMessage(resultPost).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
state.ballotId = res.data.data.ballotId;
|
||||
console.log("res.data.data2==============", res.data.data);
|
||||
console.log("res.state.ballotId=2s=============", state.ballotId);
|
||||
message.success("创建成功");
|
||||
closeDrawer();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
const handleAllCancel = () => {
|
||||
state.allFormsData = [];
|
||||
};
|
||||
|
||||
const checkVal = (filterData) => {
|
||||
console.log("filterData.====", filterData);
|
||||
console.log("filterData.voteStemVoList====", filterData.voteStemDtoList);
|
||||
|
||||
if (!filterData.voteStemDtoList) {
|
||||
message.error("请添加题干");
|
||||
return false;
|
||||
}
|
||||
let arr = filterData.voteStemDtoList;
|
||||
arr.forEach((item) => {
|
||||
console.log("item===", item);
|
||||
console.log("!item.voteStemName===", !item.voteStemName);
|
||||
if (!item.voteStemName) {
|
||||
console.log("item.voteStemName===", item.voteStemName);
|
||||
message.error("题干为必填 请确认", item.voteStemName);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return true;
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
handleTypes,
|
||||
handleSave,
|
||||
handleAllCancel,
|
||||
handleDel,
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
edits,
|
||||
delOption,
|
||||
addOption,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.researchadd {
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 25px;
|
||||
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
margin-left: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.main_left {
|
||||
margin-left: 50px;
|
||||
padding-right: 30px;
|
||||
flex: 1;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
|
||||
.main_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 32px;
|
||||
|
||||
.signbox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
|
||||
.sign {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.btnbox {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
|
||||
.xkbtn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
background: #388be1;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-right: 8px;
|
||||
color: #fff;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.fileTigan {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 3px 5px;
|
||||
background-color: rgba(42, 103, 209, 0.4);
|
||||
|
||||
span {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.delBox {
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
background-image: url(@/assets/images/basicinfo/ch.png);
|
||||
background-size: 100% 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main_item2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 32px;
|
||||
|
||||
.signbox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
|
||||
.sign {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.kqszbox {
|
||||
.qdqtbox {
|
||||
margin-left: 56px;
|
||||
}
|
||||
|
||||
.setbox {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 24px;
|
||||
|
||||
.timerbox {
|
||||
margin-top: 6px;
|
||||
margin-right: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnbox2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
|
||||
.xkbtn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
background: #388be1;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-right: 16px 8px 32px 0;
|
||||
color: #fff;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,12 +1,20 @@
|
||||
<!-- 评估管理-创建评估页面 -->
|
||||
<template>
|
||||
<a-drawer :visible="createVoteVisible" class="drawerStyle createvoteDrawer" width="100%" placement="right"
|
||||
@after-visible-change="afterVisibleChange">
|
||||
<a-drawer
|
||||
:visible="createVoteVisible"
|
||||
class="drawerStyle createvoteDrawer"
|
||||
width="100%"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="researchadd">
|
||||
<div class="header">
|
||||
<div class="headerTitle">创建投票</div>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer" />
|
||||
<div class="headerTitle">{{ ballotId ? "编辑投票" : "创建投票" }}</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="main_left">
|
||||
<div class="main_item">
|
||||
@@ -17,8 +25,12 @@
|
||||
<span style="margin-right: 3px">投票名称:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input v-model:value="ballotName" style="width: 424px; height: 32px" placeholder="请输入任务名称"
|
||||
maxlength="20" />
|
||||
<a-input
|
||||
v-model:value="ballotName"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入任务名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item">
|
||||
@@ -36,26 +48,34 @@
|
||||
</div>
|
||||
|
||||
<div v-for="(item, index) in allFormsData" :key="index">
|
||||
<VoteQuestion v-model:info="information" :item="item" :optionId="optionId" @delOption="delOption"
|
||||
@del="handleDel" @edits="edits" @addOption="addOption" />
|
||||
<VoteQuestion :item="item" @del="handleDel" />
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<div class="btn">
|
||||
<a-button type="primary" style="
|
||||
<a-button
|
||||
type="primary"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
background-color: #409eff;
|
||||
" @click="handleSave">
|
||||
"
|
||||
@click="handleSave"
|
||||
>
|
||||
保存
|
||||
</a-button>
|
||||
<a-button type="primary" ghost style="
|
||||
<a-button
|
||||
type="primary"
|
||||
ghost
|
||||
style="
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
margin-left: 14px;
|
||||
border-radius: 8px;
|
||||
" @click="handleAllCancel">
|
||||
"
|
||||
@click="handleAllCancel"
|
||||
>
|
||||
取消
|
||||
</a-button>
|
||||
</div>
|
||||
@@ -70,7 +90,7 @@ import { message } from "ant-design-vue";
|
||||
import VoteQuestion from "./VoteQuestion.vue";
|
||||
|
||||
import {
|
||||
// sortBy,
|
||||
sortBy,
|
||||
traverseArr,
|
||||
//filterCommon,
|
||||
// deepCloneFilterString,
|
||||
@@ -79,7 +99,7 @@ import {
|
||||
//import store from "@/store";
|
||||
import * as api from "@/api/indexVote";
|
||||
//import { useRouter } from "vue-router";
|
||||
import { } from "@/api/indexResearch";
|
||||
import {} from "@/api/indexResearch";
|
||||
|
||||
//import { message } from "ant-design-vue";
|
||||
|
||||
@@ -107,8 +127,6 @@ export default {
|
||||
ballotId: "",
|
||||
ballotName: "",
|
||||
allFormsData: [],
|
||||
allFormsData1: [],
|
||||
|
||||
});
|
||||
// const router = useRouter();
|
||||
const afterVisibleChange = () => {
|
||||
@@ -116,9 +134,7 @@ export default {
|
||||
getInfoDate();
|
||||
} else {
|
||||
handleTypes();
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:createVoteVisible", false);
|
||||
@@ -130,49 +146,39 @@ export default {
|
||||
console.log("props.editChild=====", props.editChild);
|
||||
if (props.ballotId) {
|
||||
console.log("props.editChild2=====", props.editChild);
|
||||
let res = await api
|
||||
.queryStemByStemId(props.ballotId)
|
||||
.then((res) => {
|
||||
let res = await api.queryStemByStemId(props.ballotId).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
return res.data.data;
|
||||
}
|
||||
});
|
||||
console.log("res====", res);
|
||||
state.ballotName = res.ballotId;
|
||||
// let renderArr = [...res];
|
||||
// sortBy(renderArr, "orderNumber"); //序号
|
||||
state.allFormsData = parseData(res); //类型
|
||||
state.allFormsData1 = parseData(res); //类型
|
||||
|
||||
console.log(state.allFormsData);
|
||||
state.ballotId = res.ballotId;
|
||||
state.ballotName = res.ballotName;
|
||||
let renderArr = [...res.voteStemVoList];
|
||||
sortBy(renderArr, "orderNumber"); //序号
|
||||
state.allFormsData = parseData(renderArr);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 转换成前端格式
|
||||
const parseData = (arr) => {
|
||||
const resultArr = [];
|
||||
state.ballotId = arr.ballotId;
|
||||
state.ballotName = arr.ballotName;
|
||||
|
||||
console.log("arr.voteStemVoList=====", arr.voteStemVoList);
|
||||
arr.voteStemVoList.forEach((item) => {
|
||||
console.log("arr.voteStemVoList=====", arr);
|
||||
arr.forEach((item) => {
|
||||
let obj = {};
|
||||
let restList = traverseArr(item.optionDetailList, {
|
||||
inputVal: "optionName",
|
||||
imgVal: "optionPictureAddress",
|
||||
optionId: "optionId",
|
||||
voteStemId: "voteStemId",
|
||||
stem: "stem",
|
||||
}).map((itm, idx) => {
|
||||
itm.id = idx + 1;
|
||||
return itm;
|
||||
});
|
||||
|
||||
obj = {
|
||||
voteStemId: item.voteStemId,
|
||||
valueSingle: item.voteStemName,
|
||||
singleList: restList,
|
||||
orderNumber: item.orderNumber,
|
||||
};
|
||||
resultArr.push(obj);
|
||||
});
|
||||
@@ -189,34 +195,25 @@ export default {
|
||||
arr.forEach((item) => {
|
||||
let obj = {};
|
||||
console.log("item=======", item);
|
||||
// if (item[typeKey] === 1) {
|
||||
let restList = traverseArr(item.singleList, {
|
||||
optionName: "inputVal",
|
||||
optionPictureAddress: "imgVal",
|
||||
optionId: "optionId",
|
||||
voteStemId: "voteStemId",
|
||||
stem: "stem",
|
||||
}).map((itm, idx) => {
|
||||
itm.optionOrderNum = idx + 1;
|
||||
return itm;
|
||||
});
|
||||
restList.forEach((item) => {
|
||||
item.optionId = item.optionId
|
||||
? item.optionId
|
||||
: "";
|
||||
item.optionId = item.optionId ? item.optionId : "";
|
||||
});
|
||||
|
||||
obj = {
|
||||
|
||||
voteStemName: item.valueSingle,
|
||||
optionDetailList: restList,
|
||||
voteStemId: item.voteStemId,
|
||||
|
||||
singleList: restList,
|
||||
orderNumber: item.orderNumber,
|
||||
};
|
||||
resultArr.push(obj);
|
||||
// }
|
||||
console.log("resultArr=======", resultArr);
|
||||
|
||||
});
|
||||
resultArr.map((itm, idx) => {
|
||||
itm.orderNumber = idx + 1;
|
||||
@@ -226,40 +223,26 @@ export default {
|
||||
};
|
||||
|
||||
// 解散传值
|
||||
const parseItem = (arrr) => {
|
||||
// const filterComObj = filterCommon(arr, "questionType");
|
||||
const parseItem = (arrSingle) => {
|
||||
console.log("arrSingle");
|
||||
console.log(arrSingle);
|
||||
let resultObj = {};
|
||||
// for (let key in filterComObj) {
|
||||
// if (key === "1") {
|
||||
// let arrSingle = arrr
|
||||
//filterComObj[key];
|
||||
console.log("arrr======", arrr);
|
||||
/*
|
||||
let arr = [];
|
||||
arrSingle.forEach((item) => {
|
||||
console.log("item======",item);
|
||||
if (item.singleList.length) {
|
||||
item.singleList.forEach((itm) => {
|
||||
arr.push({
|
||||
...itm,
|
||||
optionName: item.optionName,
|
||||
optionOrderNum: item.optionOrderNum,
|
||||
|
||||
voteStemName: item.voteStemName,
|
||||
orderNumber: item.orderNumber,
|
||||
optionDetailList: item.singleList,
|
||||
});
|
||||
});
|
||||
}
|
||||
});*/
|
||||
resultObj.voteStemDtoList = arrr;
|
||||
// }
|
||||
resultObj.voteStemDtoList = arr;
|
||||
console.log("resultObj======", resultObj);
|
||||
// }
|
||||
return resultObj;
|
||||
};
|
||||
|
||||
|
||||
const handleTypes = () => {
|
||||
let obj = {
|
||||
id: state.allFormsData.length,
|
||||
id: state.allFormsData.length + 1,
|
||||
valueSingle: "",
|
||||
singleList: [
|
||||
{
|
||||
@@ -275,107 +258,49 @@ export default {
|
||||
],
|
||||
};
|
||||
state.allFormsData.push(obj);
|
||||
state.allFormsData1.push(obj);
|
||||
};
|
||||
|
||||
const handleDel = ({ id }) => {
|
||||
console.log('1234523432434234234', id, state.allFormsData)
|
||||
const handleDel = ({ id, curItem }) => {
|
||||
console.log(888888888);
|
||||
console.log(id);
|
||||
console.log(curItem);
|
||||
|
||||
state.allFormsData.forEach((item, index) => {
|
||||
if (item.id === id) {
|
||||
console.log('oooooo', item)
|
||||
state.allFormsData.splice(index, 1);
|
||||
}
|
||||
});
|
||||
console.log(5656777777777);
|
||||
console.log(state.allFormsData);
|
||||
state.allFormsData.map((item, index) => {
|
||||
item.id = index + 1;
|
||||
return item;
|
||||
});
|
||||
|
||||
// state.allFormsData.map((item, index) => {
|
||||
// item.id = index + 1;
|
||||
// return item;
|
||||
// });
|
||||
|
||||
// orderNumber: curItem.orderNumber,
|
||||
api.deleteVoteStem(curItem.voteStemId).then((res) => {
|
||||
console.log(56444);
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
|
||||
const delOption = (data) => {
|
||||
console.log('datadatadatadatadata', data, state.allFormsData)
|
||||
state.allFormsData.forEach((item, index) => {
|
||||
if (item.voteStemId === data.value.voteStemId) {
|
||||
state.allFormsData[index].singleList.forEach((ii, nn) => {
|
||||
if (ii.id == data.value.id) {
|
||||
console.log(1212121212, state.allFormsData[index].singleList[nn], nn)
|
||||
state.allFormsData[index].singleList.splice(nn, 1)
|
||||
console.log('12', state.allFormsData)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
state.allFormsData1.forEach((item, index) => {
|
||||
if (item.voteStemId === data.value.voteStemId) {
|
||||
state.allFormsData1[index].singleList.forEach((ii, nn) => {
|
||||
if (ii.id == data.value.id) {
|
||||
console.log(1212121212, state.allFormsData1[index].singleList[nn], nn)
|
||||
state.allFormsData1[index].singleList.splice(nn, 1)
|
||||
console.log('33', state.allFormsData1)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
const edits = (data) => {
|
||||
console.log('我传递过来了吗---111', data, data.value.id, state.allFormsData1)
|
||||
|
||||
state.allFormsData1.forEach((item, index) => {
|
||||
if (item.voteStemId === data.value.voteStemId) {
|
||||
item.singleList.forEach((ii, nn) => {
|
||||
if (ii.id === data.value.id) {
|
||||
// ii.optionName = data.value.inputVal
|
||||
state.allFormsData1[index].singleList[nn].inputVal = data.value.inputVal
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
console.log('123-456-789', state.allFormsData1)
|
||||
}
|
||||
|
||||
// 增加选项
|
||||
const addOption = (data) => {
|
||||
console.log(data)
|
||||
state.allFormsData1.forEach((item, index) => {
|
||||
if (item.voteStemId === data.value.voteStemId) {
|
||||
state.allFormsData1[index].singleList = data.value.singleList
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const handleSave = () => {
|
||||
|
||||
|
||||
let resultPost = {};
|
||||
let filterData = parseItem(restData(state.allFormsData));
|
||||
|
||||
let filterData = parseItem(restData(state.allFormsData1, "type"));
|
||||
|
||||
console.log("filterData==111", filterData)
|
||||
|
||||
if (!state.ballotName) {
|
||||
return message.warning("请输入投票名称");
|
||||
}
|
||||
// 校验s
|
||||
console.log("filterData==111", filterData);
|
||||
|
||||
// 校验
|
||||
if (!state.ballotName) {
|
||||
message.warning("请输入投票名称");
|
||||
return false;
|
||||
}
|
||||
if (!checkVal(filterData)) {
|
||||
return false;
|
||||
}
|
||||
// checkVal(filterData);
|
||||
console.log(12121212);
|
||||
console.log(filterData);
|
||||
console.log('111111222223333----0000', state.ballotId)
|
||||
console.log("111111222223333----0000", state.ballotId);
|
||||
|
||||
if (state.ballotId) {
|
||||
resultPost = {
|
||||
ballotId: state.ballotId,
|
||||
@@ -391,7 +316,7 @@ export default {
|
||||
console.log(resultPost);
|
||||
api.updateStemMessage(resultPost).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
state.ballotId = res.data.data.ballotId
|
||||
state.ballotId = res.data.data.ballotId;
|
||||
console.log("res.data.data==============", res.data.data);
|
||||
console.log("res.state.ballotId==============", state.ballotId);
|
||||
message.success("编辑成功");
|
||||
@@ -408,11 +333,10 @@ export default {
|
||||
"assessmentMaxScore",
|
||||
"assessmentMinScore",
|
||||
]);*/
|
||||
|
||||
console.log("=========", resultPost);
|
||||
api.createStemMessage(resultPost).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
state.ballotId = res.data.data.ballotId
|
||||
state.ballotId = res.data.data.ballotId;
|
||||
console.log("res.data.data2==============", res.data.data);
|
||||
console.log("res.state.ballotId=2s=============", state.ballotId);
|
||||
message.success("创建成功");
|
||||
@@ -420,7 +344,6 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
const handleAllCancel = () => {
|
||||
state.allFormsData = [];
|
||||
@@ -447,7 +370,6 @@ export default {
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
handleTypes,
|
||||
@@ -456,9 +378,6 @@ export default {
|
||||
handleDel,
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
edits,
|
||||
delOption,
|
||||
addOption
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
522
src/components/vote/VoteQuestion copy.vue
Normal file
522
src/components/vote/VoteQuestion copy.vue
Normal file
@@ -0,0 +1,522 @@
|
||||
<!-- 评估管理-创建评估页面 -->
|
||||
<template>
|
||||
<!-- 单选题 -->
|
||||
<div class="content">
|
||||
<div class="tagbox">
|
||||
<div class="deleteop" @click="handleTypesDel">
|
||||
<div><img src="../../assets/images/projectadd/delete.png" /></div>
|
||||
<div class="del_text">删除选项</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||
<div class="inname">题干{{ item.id + 1 }}</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input
|
||||
v-model:value="curItem.valueSingle"
|
||||
placeholder="请输入题干名称"
|
||||
show-count
|
||||
:maxlength="20"
|
||||
style="border-radius: 8px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<VoteQuestionItem
|
||||
v-model:info="info"
|
||||
v-for="(item, index) in curItem.singleList"
|
||||
:key="index"
|
||||
:item="item"
|
||||
@input="input"
|
||||
@src="imgSrc"
|
||||
@delImg="delImg"
|
||||
@del="del"
|
||||
@edit="edit"
|
||||
/>
|
||||
<div class="name">
|
||||
<div class="in" style="margin-left: 85px; margin-bottom: 20px">
|
||||
<a-button
|
||||
type="primary"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
background-color: #409eff;
|
||||
"
|
||||
@click="handleSingleAdd"
|
||||
>
|
||||
添加选项
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import VoteQuestionItem from "./VoteQuestionItem.vue";
|
||||
import { ref } from "vue";
|
||||
import * as api from "../../api/indexVote";
|
||||
export default {
|
||||
name: "CreateVote",
|
||||
components: {
|
||||
VoteQuestionItem,
|
||||
},
|
||||
props: {
|
||||
num: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const curItem = ref(props.item);
|
||||
const handleTypesDel = () => {
|
||||
console.log("删除题干======", {
|
||||
id: curItem.value.id,
|
||||
curItem: curItem.value,
|
||||
});
|
||||
api.deleteVoteStem(curItem.value.voteStemId).then(() => {
|
||||
// message.success('删除题干信息成功')
|
||||
emit("del", { id: curItem.value.id, curItem: curItem.value });
|
||||
});
|
||||
};
|
||||
|
||||
const handleSingleAdd = () => {
|
||||
curItem.value.singleList.push({
|
||||
id: curItem.value.singleList.length + 1,
|
||||
inputVal: "",
|
||||
imgVal: "",
|
||||
});
|
||||
emit("addOption", curItem);
|
||||
};
|
||||
const input = ({ id, val }) => {
|
||||
console.log(id, val);
|
||||
curItem.value.singleList.forEach((item) => {
|
||||
if (item.id === id) {
|
||||
item.inputVal = val;
|
||||
}
|
||||
});
|
||||
};
|
||||
const imgSrc = ({ id, src }) => {
|
||||
curItem.value.singleList.forEach((item) => {
|
||||
if (item.id === id) {
|
||||
item.imgVal = src;
|
||||
}
|
||||
});
|
||||
};
|
||||
const delImg = ({ id }) => {
|
||||
curItem.value.singleList.forEach((item) => {
|
||||
if (item.id === id) {
|
||||
item.imgVal = "";
|
||||
}
|
||||
});
|
||||
};
|
||||
const del = ({ id, data }) => {
|
||||
console.log(data);
|
||||
api.deleteVoteStemOption(data.value.optionId).then(() => {
|
||||
// message.success('删除题干信息成功')
|
||||
emit("delOption", data);
|
||||
});
|
||||
curItem.value.singleList.forEach((item, index) => {
|
||||
if (item.id === id) {
|
||||
curItem.value.singleList.splice(index, 1);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const edit = (data) => {
|
||||
// console.log('111111-223', data.value)
|
||||
emit("edits", data);
|
||||
};
|
||||
|
||||
return {
|
||||
curItem,
|
||||
handleTypesDel,
|
||||
handleSingleAdd,
|
||||
input,
|
||||
imgSrc,
|
||||
delImg,
|
||||
del,
|
||||
edit,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.researchadd {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
color: #000000;
|
||||
font-size: 18px;
|
||||
//line-height: 36px;
|
||||
padding-top: 30px;
|
||||
padding-left: 37px;
|
||||
//font-weight: 500;
|
||||
}
|
||||
|
||||
.goback {
|
||||
padding-right: 70px;
|
||||
//padding-top: 37px;
|
||||
position: relative;
|
||||
|
||||
.return {
|
||||
display: inline-block;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
margin-top: 17px;
|
||||
margin-right: 10px;
|
||||
background-image: url("../../assets/images/projectadd/return.png");
|
||||
}
|
||||
|
||||
.returntext {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 27px;
|
||||
color: #4ea6ff;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.addtype {
|
||||
display: flex;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
margin-right: 20px;
|
||||
align-items: center;
|
||||
margin-left: 41px;
|
||||
|
||||
.addtypen {
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.types {
|
||||
cursor: pointer;
|
||||
width: 80px;
|
||||
height: 40px;
|
||||
color: #409eff;
|
||||
border: 1px solid #409eff;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 20px 10px;
|
||||
}
|
||||
|
||||
.typesCur {
|
||||
color: #fff;
|
||||
background: #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
width: 70%;
|
||||
min-width: 690px;
|
||||
margin-left: 38px;
|
||||
margin-top: 20px;
|
||||
|
||||
.tagbox {
|
||||
display: flex;
|
||||
justify-content: right;
|
||||
|
||||
.tagname {
|
||||
width: 90px;
|
||||
height: 32px;
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 134px;
|
||||
background: rgba(78, 166, 255, 0.1);
|
||||
border-radius: 4px;
|
||||
color: rgba(64, 158, 255, 1);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.deleteop {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
margin-top: 20px;
|
||||
margin-right: 30px;
|
||||
border: 1px solid #409eff;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
|
||||
.del_text {
|
||||
color: #409eff;
|
||||
font-size: 14px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scorebox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
margin-left: 70px;
|
||||
|
||||
.scoretext {
|
||||
font-size: 14px;
|
||||
color: #56a3f9;
|
||||
}
|
||||
|
||||
.number {
|
||||
display: flex;
|
||||
border: 1px solid #d7e5fd;
|
||||
border-radius: 5px;
|
||||
margin: 0 10px;
|
||||
padding: 5px;
|
||||
|
||||
.btn {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 1px solid #56a3f9;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #56a3f9;
|
||||
line-height: 24px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.curBtn {
|
||||
background: #56a3f9;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.picture {
|
||||
width: 100px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 20px;
|
||||
margin-left: 133px;
|
||||
|
||||
.pictureimg {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.picturename {
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.delete {
|
||||
cursor: pointer;
|
||||
margin-top: 32px;
|
||||
margin-left: 107px;
|
||||
// float: right;
|
||||
color: #4ea6ff;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.name2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 60%;
|
||||
// background-color: lightcoral;
|
||||
display: flex;
|
||||
margin-top: 20px;
|
||||
|
||||
//align-items: center;
|
||||
//height: 40px;
|
||||
// border: 1px solid black;
|
||||
.namebox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex-shrink: 0;
|
||||
|
||||
.nameimg {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.inname {
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
margin-left: 7px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.in {
|
||||
margin-left: 14px;
|
||||
flex: 1;
|
||||
|
||||
.assess {
|
||||
display: flex;
|
||||
width: 226px;
|
||||
height: 40px;
|
||||
border: 1px solid #56a3f9;
|
||||
|
||||
//margin-bottom: 20px;
|
||||
.assesstype {
|
||||
width: 50%;
|
||||
background: #56a3f9;
|
||||
color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.assesswhole {
|
||||
width: 50%;
|
||||
background: rgba(86, 163, 249, 0.1);
|
||||
font-size: 14px;
|
||||
color: #6f6f6f;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ratio {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 8px;
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.addimg {
|
||||
cursor: pointer;
|
||||
color: rgba(78, 166, 255, 1);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
//line-height: 24px;
|
||||
}
|
||||
|
||||
.ant-radio-wrapper {
|
||||
}
|
||||
|
||||
.ant-input {
|
||||
border-radius: 5px;
|
||||
// height: 120%;
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.ant-select-selector {
|
||||
border-radius: 5px;
|
||||
// height: 120%;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.numberInp {
|
||||
width: 200px;
|
||||
|
||||
.ant-input-number {
|
||||
width: 200px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
// .ant-input-number-input-wrap {
|
||||
// width: 200px;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.name2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.opinion {
|
||||
display: flex;
|
||||
margin-top: 30px;
|
||||
|
||||
.namebox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.in {
|
||||
margin-left: 14px;
|
||||
width: 500px;
|
||||
|
||||
.ant-input-textarea-show-count {
|
||||
position: relative;
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
.ant-input-textarea-show-count::after {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.ant-input {
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
margin-top: 31px;
|
||||
margin-bottom: 14px;
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.uploadContent {
|
||||
display: block !important;
|
||||
|
||||
.uploadBtn {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -14,16 +14,37 @@
|
||||
<div class="inname">题干{{ item.id }}</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="curItem.valueSingle" placeholder="请输入题干名称" show-count :maxlength="20"
|
||||
style="border-radius: 8px" />
|
||||
<a-input
|
||||
v-model:value="curItem.valueSingle"
|
||||
placeholder="请输入题干名称"
|
||||
show-count
|
||||
:maxlength="20"
|
||||
style="border-radius: 8px"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<VoteQuestionItem v-model:info="info" v-for="(item, index) in curItem.singleList" :key="index" :item="item"
|
||||
@input="input" @src="imgSrc" @delImg="delImg" @del="del" @edit="edit" />
|
||||
<VoteQuestionItem
|
||||
v-model:info="info"
|
||||
v-for="(item, index) in curItem.singleList"
|
||||
:key="index"
|
||||
:item="item"
|
||||
@input="input"
|
||||
@src="imgSrc"
|
||||
@delImg="delImg"
|
||||
@del="del"
|
||||
/>
|
||||
<div class="name">
|
||||
<div class="in" style="margin-left: 85px; margin-bottom: 20px">
|
||||
<a-button type="primary" style="width: 100px;height: 40px;border-radius: 8px;background-color: #409eff;"
|
||||
@click="handleSingleAdd">
|
||||
<a-button
|
||||
type="primary"
|
||||
style="
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
background-color: #409eff;
|
||||
"
|
||||
@click="handleSingleAdd"
|
||||
>
|
||||
添加选项
|
||||
</a-button>
|
||||
</div>
|
||||
@@ -31,41 +52,28 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import VoteQuestionItem from "./VoteQuestionItem.vue";
|
||||
import { ref } from "vue";
|
||||
import VoteQuestionItem from "./VoteQuestionItem.vue";
|
||||
import * as api from "../../api/indexVote";
|
||||
|
||||
export default {
|
||||
name: "CreateVote",
|
||||
components: {
|
||||
VoteQuestionItem,
|
||||
},
|
||||
props: {
|
||||
num: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
|
||||
|
||||
|
||||
const curItem = ref(props.item);
|
||||
|
||||
const handleTypesDel = () => {
|
||||
|
||||
console.log("删除题干======", { id: curItem.value.id, curItem: curItem.value });
|
||||
api.deleteVoteStem(curItem.value.voteStemId)
|
||||
.then(() => {
|
||||
// message.success('删除题干信息成功')
|
||||
emit("del", { id: curItem.value.id, curItem: curItem.value });
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
const handleSingleAdd = () => {
|
||||
@@ -74,10 +82,8 @@ export default {
|
||||
inputVal: "",
|
||||
imgVal: "",
|
||||
});
|
||||
emit("addOption", curItem);
|
||||
};
|
||||
const input = ({ id, val }) => {
|
||||
console.log(id, val)
|
||||
curItem.value.singleList.forEach((item) => {
|
||||
if (item.id === id) {
|
||||
item.inputVal = val;
|
||||
@@ -98,28 +104,22 @@ export default {
|
||||
}
|
||||
});
|
||||
};
|
||||
const del = ({ id, data }) => {
|
||||
console.log(data)
|
||||
api.deleteVoteStemOption(data.value.optionId)
|
||||
.then(() => {
|
||||
// message.success('删除题干信息成功')
|
||||
emit("delOption", data);
|
||||
})
|
||||
const del = ({ id, optionId }) => {
|
||||
curItem.value.singleList.forEach((item, index) => {
|
||||
if (item.id === id) {
|
||||
curItem.value.singleList.splice(index, 1);
|
||||
}
|
||||
});
|
||||
curItem.value.singleList.map((item, index) => {
|
||||
item.id = index + 1;
|
||||
});
|
||||
|
||||
|
||||
|
||||
api.deleteVoteStemOption(optionId).then((res) => {
|
||||
console.log(56444);
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
|
||||
const edit = (data) => {
|
||||
// console.log('111111-223', data.value)
|
||||
emit("edits", data)
|
||||
}
|
||||
|
||||
return {
|
||||
curItem,
|
||||
handleTypesDel,
|
||||
@@ -128,7 +128,6 @@ export default {
|
||||
imgSrc,
|
||||
delImg,
|
||||
del,
|
||||
edit
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -412,7 +411,8 @@ export default {
|
||||
//line-height: 24px;
|
||||
}
|
||||
|
||||
.ant-radio-wrapper {}
|
||||
.ant-radio-wrapper {
|
||||
}
|
||||
|
||||
.ant-input {
|
||||
border-radius: 5px;
|
||||
|
||||
495
src/components/vote/VoteQuestionItem copy.vue
Normal file
495
src/components/vote/VoteQuestionItem copy.vue
Normal file
@@ -0,0 +1,495 @@
|
||||
<!-- 评估管理-创建评估页面 -->
|
||||
<template>
|
||||
<div class="itemRow">
|
||||
<div class="options">
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<div class="inname">选项{{ item.id }}</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input
|
||||
v-model:value="curItem.inputVal"
|
||||
show-count
|
||||
:maxlength="30"
|
||||
style="border-radius: 8px"
|
||||
@change="handleInput"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="delete" @click="handleDel">删除</div>
|
||||
</div>
|
||||
<div class="name uploadContent">
|
||||
<a-upload
|
||||
v-show="!item.imgVal"
|
||||
class="in uploadBtn"
|
||||
:show-upload-list="false"
|
||||
:before-upload="beforeUpload"
|
||||
>
|
||||
<div class="addimg">+添加图片</div>
|
||||
</a-upload>
|
||||
<div v-show="item.imgVal" class="picture" style="position: relative">
|
||||
<img class="pictureimg" :src="item.imgVal" />
|
||||
<div class="picturename" v-show="hasImgName">{{ hasImgName }}</div>
|
||||
<img
|
||||
style="
|
||||
cursor: pointer;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="handleCancel"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { fileUp } from "../../api/indexEval";
|
||||
|
||||
export default {
|
||||
name: "VoteQuestionItem",
|
||||
props: {
|
||||
item: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const curItem = ref(props.item);
|
||||
const state = reactive({
|
||||
hasImgName: "",
|
||||
});
|
||||
|
||||
const handleInput = (value) => {
|
||||
console.log(value.target.value);
|
||||
emit("edit", curItem);
|
||||
emit("input", { id: curItem.value.id, val: value.target.value });
|
||||
};
|
||||
const handleDel = () => {
|
||||
handleCancel();
|
||||
emit("del", {
|
||||
id: curItem.value.id,
|
||||
optionId: curItem.value.optionId,
|
||||
data: curItem,
|
||||
});
|
||||
};
|
||||
const handleCancel = () => {
|
||||
state.hasImgName = "";
|
||||
emit("delImg", { id: curItem.value.id });
|
||||
};
|
||||
const beforeUpload = (file) => {
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/jpeg" ||
|
||||
file.type === "image/png" ||
|
||||
file.type === "image/svg" ||
|
||||
file.type === "image/bmp" ||
|
||||
file.type === "image/gif";
|
||||
if (!isJpgOrPng) {
|
||||
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!");
|
||||
return false;
|
||||
}
|
||||
|
||||
let isLt1M = file.size / 10240 / 10240 <= 1;
|
||||
if (!isLt1M) {
|
||||
this.$message.error("图片大小超过10MB!");
|
||||
return false;
|
||||
}
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
fileUp(formData).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
state.hasImgName = file.name;
|
||||
emit("src", { id: curItem.value.id, src: res.data.data });
|
||||
}
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
curItem,
|
||||
handleInput,
|
||||
handleDel,
|
||||
handleCancel,
|
||||
beforeUpload,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.researchadd {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.header {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
color: #000000;
|
||||
font-size: 18px;
|
||||
//line-height: 36px;
|
||||
padding-top: 30px;
|
||||
padding-left: 37px;
|
||||
//font-weight: 500;
|
||||
}
|
||||
|
||||
.goback {
|
||||
padding-right: 70px;
|
||||
//padding-top: 37px;
|
||||
position: relative;
|
||||
|
||||
.return {
|
||||
display: inline-block;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
margin-top: 17px;
|
||||
margin-right: 10px;
|
||||
background-image: url("../../assets/images/projectadd/return.png");
|
||||
}
|
||||
|
||||
.returntext {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 27px;
|
||||
color: #4ea6ff;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.addtype {
|
||||
display: flex;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
margin-right: 20px;
|
||||
align-items: center;
|
||||
margin-left: 41px;
|
||||
|
||||
.addtypen {
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.types {
|
||||
cursor: pointer;
|
||||
width: 80px;
|
||||
height: 40px;
|
||||
color: #409eff;
|
||||
border: 1px solid #409eff;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 20px 10px;
|
||||
}
|
||||
|
||||
.typesCur {
|
||||
color: #fff;
|
||||
background: #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
width: 70%;
|
||||
min-width: 690px;
|
||||
margin-left: 38px;
|
||||
margin-top: 20px;
|
||||
|
||||
.tagbox {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.tagname {
|
||||
width: 90px;
|
||||
height: 32px;
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 134px;
|
||||
background: rgba(78, 166, 255, 0.1);
|
||||
border-radius: 4px;
|
||||
color: rgba(64, 158, 255, 1);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.deleteop {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
margin-top: 20px;
|
||||
margin-right: 30px;
|
||||
border: 1px solid #409eff;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
|
||||
.del_text {
|
||||
color: #409eff;
|
||||
font-size: 14px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scorebox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
margin-left: 70px;
|
||||
|
||||
.scoretext {
|
||||
font-size: 14px;
|
||||
color: #56a3f9;
|
||||
}
|
||||
|
||||
.number {
|
||||
display: flex;
|
||||
border: 1px solid #d7e5fd;
|
||||
border-radius: 5px;
|
||||
margin: 0 10px;
|
||||
padding: 5px;
|
||||
|
||||
.btn {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 1px solid #56a3f9;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #56a3f9;
|
||||
line-height: 24px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.picture {
|
||||
width: 100px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 20px;
|
||||
margin-left: 133px;
|
||||
|
||||
.pictureimg {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.picturename {
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.delete {
|
||||
cursor: pointer;
|
||||
margin-top: 32px;
|
||||
margin-left: 107px;
|
||||
// float: right;
|
||||
color: #4ea6ff;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.name2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 60%;
|
||||
// background-color: lightcoral;
|
||||
display: flex;
|
||||
margin-top: 20px;
|
||||
|
||||
//align-items: center;
|
||||
//height: 40px;
|
||||
// border: 1px solid black;
|
||||
.namebox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex-shrink: 0;
|
||||
|
||||
.nameimg {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.inname {
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
margin-left: 7px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.in {
|
||||
margin-left: 14px;
|
||||
flex: 1;
|
||||
|
||||
.assess {
|
||||
display: flex;
|
||||
width: 226px;
|
||||
height: 40px;
|
||||
border: 1px solid #56a3f9;
|
||||
|
||||
//margin-bottom: 20px;
|
||||
.assesstype {
|
||||
width: 50%;
|
||||
background: #56a3f9;
|
||||
color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.assesswhole {
|
||||
width: 50%;
|
||||
background: rgba(86, 163, 249, 0.1);
|
||||
font-size: 14px;
|
||||
color: #6f6f6f;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ratio {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 8px;
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.addimg {
|
||||
cursor: pointer;
|
||||
color: rgba(78, 166, 255, 1);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
//line-height: 24px;
|
||||
}
|
||||
|
||||
.ant-radio-wrapper {
|
||||
}
|
||||
|
||||
.ant-input {
|
||||
border-radius: 5px;
|
||||
// height: 120%;
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.ant-select-selector {
|
||||
border-radius: 5px;
|
||||
// height: 120%;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.numberInp {
|
||||
width: 200px;
|
||||
|
||||
.ant-input-number {
|
||||
width: 200px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
// .ant-input-number-input-wrap {
|
||||
// width: 200px;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.name2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.opinion {
|
||||
display: flex;
|
||||
margin-top: 30px;
|
||||
|
||||
.namebox {
|
||||
width: 120px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.in {
|
||||
margin-left: 14px;
|
||||
width: 500px;
|
||||
|
||||
.ant-input-textarea-show-count {
|
||||
position: relative;
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
.ant-input-textarea-show-count::after {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.ant-input {
|
||||
border-radius: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
margin-top: 31px;
|
||||
margin-bottom: 14px;
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.uploadContent {
|
||||
display: block !important;
|
||||
|
||||
.uploadBtn {
|
||||
margin-left: 120px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -7,27 +7,41 @@
|
||||
<div class="inname">选项{{ item.id }}</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input v-model:value="curItem.inputVal" show-count :maxlength="30" style="border-radius: 8px"
|
||||
@change="handleInput" />
|
||||
<a-input
|
||||
v-model:value="curItem.inputVal"
|
||||
show-count
|
||||
:maxlength="30"
|
||||
style="border-radius: 8px"
|
||||
@change="handleInput"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="delete" @click="handleDel">删除</div>
|
||||
</div>
|
||||
<div class="name uploadContent">
|
||||
<a-upload v-show="!item.imgVal" class="in uploadBtn" :show-upload-list="false" :before-upload="beforeUpload">
|
||||
<a-upload
|
||||
v-show="!item.imgVal"
|
||||
class="in uploadBtn"
|
||||
:show-upload-list="false"
|
||||
:before-upload="beforeUpload"
|
||||
>
|
||||
<div class="addimg">+添加图片</div>
|
||||
</a-upload>
|
||||
<div v-show="item.imgVal" class="picture" style="position: relative">
|
||||
<img class="pictureimg" :src="item.imgVal" />
|
||||
<div class="picturename" v-show="hasImgName">{{ hasImgName }}</div>
|
||||
<img style="
|
||||
<img
|
||||
style="
|
||||
cursor: pointer;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
" src="../../assets/images/basicinfo/close.png" @click="handleCancel" />
|
||||
"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="handleCancel"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,14 +67,12 @@ export default {
|
||||
hasImgName: "",
|
||||
});
|
||||
|
||||
const handleInput = (value) => {
|
||||
console.log(value.target.value)
|
||||
emit("edit", curItem)
|
||||
emit("input", { id: curItem.value.id, val: value.target.value });
|
||||
const handleInput = () => {
|
||||
emit("input", { id: curItem.value.id, val: curItem.value.inputVal });
|
||||
};
|
||||
const handleDel = () => {
|
||||
handleCancel();
|
||||
emit("del", { id: curItem.value.id, optionId: curItem.value.optionId, data: curItem });
|
||||
emit("del", { id: curItem.value.id, optionId: curItem.value.optionId });
|
||||
};
|
||||
const handleCancel = () => {
|
||||
state.hasImgName = "";
|
||||
@@ -87,6 +99,7 @@ export default {
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
console.log(file);
|
||||
fileUp(formData).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
state.hasImgName = file.name;
|
||||
@@ -381,7 +394,8 @@ export default {
|
||||
//line-height: 24px;
|
||||
}
|
||||
|
||||
.ant-radio-wrapper {}
|
||||
.ant-radio-wrapper {
|
||||
}
|
||||
|
||||
.ant-input {
|
||||
border-radius: 5px;
|
||||
|
||||
@@ -1,86 +1,92 @@
|
||||
<template>
|
||||
<a-drawer :visible="addStemVisible"
|
||||
placement="right" class="custom-class"
|
||||
<a-drawer
|
||||
:visible="addStemVisible"
|
||||
placement="right"
|
||||
class="custom-class"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
@close="closeDrawer" width="60%">
|
||||
@close="closeDrawer"
|
||||
width="60%"
|
||||
>
|
||||
<div>
|
||||
<h2 style="text-align:center;">投票查看</h2>
|
||||
<div v-for="(item,index) in form" :key="item.voteStemId">
|
||||
<div class="title">{{index+1}}. {{item.voteStemName}}</div>
|
||||
<h2 style="text-align: center">投票查看</h2>
|
||||
<div v-for="(item, index) in form" :key="item.voteStemId">
|
||||
<div class="title">{{ index + 1 }}. {{ item.voteStemName }}</div>
|
||||
<a-radio-group v-model:value="item.voteStemId">
|
||||
<a-radio :value="3" :style="radioStyle">
|
||||
{{item.optionDetailList[0].optionName}}</a-radio>
|
||||
{{ item.optionDetailList[0].optionName }}</a-radio
|
||||
>
|
||||
<br />
|
||||
<a-radio :value="2" :style="radioStyle">
|
||||
{{item.optionDetailList[1].optionName}}</a-radio>
|
||||
{{ item.optionDetailList[1].optionName }}</a-radio
|
||||
>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { reactive, toRefs,ref } from "vue";
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "@/api/indexVote"
|
||||
import * as api from "@/api/indexVote";
|
||||
|
||||
export default {
|
||||
name: "queryStem",
|
||||
props: {
|
||||
addStemVisible:{
|
||||
addStemVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
setup(props,ctx) {
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const value = ref(1);
|
||||
const state = reactive({
|
||||
form:[],
|
||||
|
||||
form: [],
|
||||
});
|
||||
const radioStyle = reactive({
|
||||
display: 'flex',
|
||||
height: '30px',
|
||||
lineHeight: '30px',
|
||||
display: "flex",
|
||||
height: "30px",
|
||||
lineHeight: "30px",
|
||||
});
|
||||
const afterVisibleChange = (bool) => {
|
||||
if(bool === true) {
|
||||
getStem()
|
||||
}
|
||||
if (bool === true) {
|
||||
getStem();
|
||||
}
|
||||
};
|
||||
const getStem = () => {
|
||||
let obj = {
|
||||
stemId:0,
|
||||
ballotId:2,
|
||||
}
|
||||
api.queryStemByStemId(obj).then((res) => {
|
||||
state.form = res.data.data
|
||||
console.log(JSON.stringify(res.data)+'***');
|
||||
stemId: 0,
|
||||
ballotId: 2,
|
||||
};
|
||||
api
|
||||
.queryStemByStemId(obj)
|
||||
.then((res) => {
|
||||
state.form = res.data.data;
|
||||
console.log(JSON.stringify(res.data) + "***");
|
||||
message.success("投票获取成功");
|
||||
console.log(res);
|
||||
}).catch((err) => {
|
||||
message.error("投票获取失败"+err);
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
.catch((err) => {
|
||||
message.error("投票获取失败" + err);
|
||||
console.log(err);
|
||||
});
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("closeDrawer")
|
||||
}
|
||||
ctx.emit("closeDrawer");
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
radioStyle,
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
value,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.title {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -57,19 +57,16 @@ export function deepCloneFilterString(obj, fillterKeys) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
export function sortBy(arr, ...keys) {
|
||||
export function sortBy(arr, key) {
|
||||
return arr.sort((x, y) => {
|
||||
for (const key of keys) {
|
||||
const valueX = typeof key === "function" ? key(x) : x[key];
|
||||
const valueY = typeof key === "function" ? key(y) : y[key];
|
||||
const valueX = parseInt(x[key]);
|
||||
const valueY = parseInt(y[key]);
|
||||
if (valueX > valueY) {
|
||||
return 1;
|
||||
}
|
||||
if (valueX < valueY) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2439,7 +2439,7 @@
|
||||
</div>
|
||||
<div class="i5_right">
|
||||
<div class="stmm_btn btn3">
|
||||
<span style="color: #ffffff" @click="showStuAdd">
|
||||
<span style="color: #ffffff" @click="showStuAdd(currentPlanItem)">
|
||||
添加学员
|
||||
</span>
|
||||
</div>
|
||||
@@ -2970,6 +2970,7 @@
|
||||
v-model:addAuthList="addAuthList"
|
||||
:authClassify="authClassify"
|
||||
classify="course"
|
||||
:type="shipType"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -3160,7 +3161,7 @@ const columns1 = [
|
||||
key: "9",
|
||||
align: "center",
|
||||
customRender: ({ text }) => {
|
||||
return text ? getdateToTime(text * 1000) : "-";
|
||||
return text ? text : "-";
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -3501,6 +3502,7 @@ export default defineComponent({
|
||||
},
|
||||
setup() {
|
||||
const state = reactive({
|
||||
shipType: 1,
|
||||
addLoading: false,
|
||||
currentPlanItem: {},
|
||||
teacherId: null,
|
||||
@@ -3750,9 +3752,11 @@ export default defineComponent({
|
||||
newCourseName: null, //新建开课名称
|
||||
});
|
||||
|
||||
const showStuAdd = () => {
|
||||
state.viewpowervisible = true;
|
||||
const showStuAdd = (record) => {
|
||||
state.selectCourseId = record.offcoursePlanId;
|
||||
state.shipType = 2;
|
||||
state.authClassify = 3;
|
||||
state.viewpowervisible = true;
|
||||
};
|
||||
|
||||
// 富文本 sssssssssssssss
|
||||
@@ -3913,6 +3917,7 @@ export default defineComponent({
|
||||
beginTime: startTime,
|
||||
});
|
||||
const { rows, total } = res.data.data;
|
||||
console.log(res.data.data);
|
||||
state.tableDataTotal1 = total;
|
||||
const datas = traverseArr(
|
||||
rows,
|
||||
@@ -4429,8 +4434,8 @@ export default defineComponent({
|
||||
};
|
||||
// 关闭查看
|
||||
const handlelookMs = () => {
|
||||
state.lookMs = false
|
||||
}
|
||||
state.lookMs = false;
|
||||
};
|
||||
//保存面授课
|
||||
const handlePush = (param) => {
|
||||
//state.isEdit = 1;
|
||||
@@ -5030,7 +5035,6 @@ export default defineComponent({
|
||||
state.ft_eidt = true;
|
||||
};
|
||||
|
||||
|
||||
const handleLook = async (itm, type) => {
|
||||
state.isEdit = 0;
|
||||
console.log(45555);
|
||||
@@ -5306,28 +5310,31 @@ export default defineComponent({
|
||||
//权限名单
|
||||
const showPrower = (record) => {
|
||||
// console.log("record", record);
|
||||
state.corpowerlistvisible = true;
|
||||
state.selectCourseId = record.offcourseId;
|
||||
state.corpowerlistvisible = true;
|
||||
};
|
||||
//归属权
|
||||
const showOwnPrower = (record) => {
|
||||
// console.log("record", record);
|
||||
state.ownpowervisible = true;
|
||||
state.selectCourseId = record.offcourseId;
|
||||
state.ownpowervisible = true;
|
||||
};
|
||||
//查看权
|
||||
const showViewPrower = (record) => {
|
||||
// console.log("record", record);
|
||||
state.viewpowervisible = true;
|
||||
state.selectCourseId = record.offcourseId;
|
||||
state.authClassify = 1;
|
||||
state.viewpowervisible = true;
|
||||
};
|
||||
//管理权
|
||||
const showManagePrower = (record) => {
|
||||
// console.log("record", record);
|
||||
state.viewpowervisible = true;
|
||||
console.log(22222222)
|
||||
console.log(record)
|
||||
state.selectCourseId = record.offcourseId;
|
||||
state.shipType = 1;
|
||||
state.authClassify = 2;
|
||||
state.viewpowervisible = true;
|
||||
};
|
||||
//添加权限
|
||||
watch(
|
||||
@@ -5508,7 +5515,7 @@ export default defineComponent({
|
||||
|
||||
closeOnlineCoursevisible,
|
||||
handlelookMs,
|
||||
handleLook
|
||||
handleLook,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
import { courseListView } from "../../api/indexAudit";
|
||||
import * as api1 from "@/api/index1";
|
||||
import { toDate } from "../../api/method";
|
||||
|
||||
export default {
|
||||
name: "CoursereViewed",
|
||||
@@ -123,7 +122,7 @@ export default {
|
||||
key: "time",
|
||||
align: "center",
|
||||
customRender: (time) => {
|
||||
return <div style="color:#387DF7">{toDate(time.record.time, "Y-M-D h:m")}</div>;
|
||||
return <div style="color:#387DF7">{time.record.time}</div>;
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
@@ -318,7 +318,6 @@
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted, ref } from "vue";
|
||||
import { list, courseAuditView, courseDetail } from "../../api/indexAudit";
|
||||
import { toDate } from "../../api/method";
|
||||
import { message } from "ant-design-vue";
|
||||
import { Editor } from "@wangeditor/editor-for-vue";
|
||||
import { iframeUrl } from "../../api/method";
|
||||
@@ -585,7 +584,7 @@ export default {
|
||||
: "-",
|
||||
change: "-",
|
||||
creater: item.createName,
|
||||
time: toDate(item.createTime, "Y-M-D h:m"),
|
||||
time: item.createTime,
|
||||
createrId: item.createId,
|
||||
offId: item.offcourseId,
|
||||
};
|
||||
|
||||
@@ -1027,7 +1027,8 @@
|
||||
:selectProjectId="routerId"
|
||||
v-model:addAuthList="addAuthList"
|
||||
:authClassify="authClassify"
|
||||
classify="addstudent"
|
||||
classify="learnPath"
|
||||
:type="2"
|
||||
/>
|
||||
<!-- 导入学员抽屉 -->
|
||||
<imp-stu v-model:AddImpStuvisible="AddImpStuvisible" />
|
||||
|
||||
@@ -1471,7 +1471,7 @@ export default {
|
||||
path: "/projectadd",
|
||||
query: {
|
||||
parentId: value.record.projectId,
|
||||
parentName: value.record.name,
|
||||
parentName: value.record.parentName + '——' + value.record.name,
|
||||
},
|
||||
});
|
||||
}}
|
||||
@@ -1573,7 +1573,7 @@ export default {
|
||||
data.forEach((e) => {
|
||||
e.parentName = parentName;
|
||||
e.key = e.projectId;
|
||||
initDataSublist(e.name, e.subList);
|
||||
initDataSublist((parentName ? (parentName + '——') : '') + e.name, e.subList);
|
||||
e.subList && e.subList.length && (e.children = e.subList);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
<div class="left clearfix">
|
||||
<div class="leftmain">
|
||||
<div class="tit">
|
||||
阶段<img
|
||||
src="../../assets/images/projectadd/right.png"
|
||||
style="margin-left: 10px; cursor: pointer"
|
||||
@click="showCancel"
|
||||
/>
|
||||
阶段
|
||||
<!-- <img-->
|
||||
<!-- src="../../assets/images/projectadd/right.png"-->
|
||||
<!-- style="margin-left: 10px; cursor: pointer"-->
|
||||
<!-- @click="showCancel"-->
|
||||
<!-- />-->
|
||||
</div>
|
||||
<div class="btn btn3" @click="showModal()" style="margin-left: 19px">
|
||||
<div class="search"></div>
|
||||
@@ -115,7 +116,7 @@
|
||||
<div class="filt">
|
||||
<div class="le">
|
||||
<div class="leftimg">
|
||||
<img class="img" :src="picUrl"/>
|
||||
<img class="img" :src="picUrl" />
|
||||
</div>
|
||||
<div class="imgfor">
|
||||
<div class="forz" style="font-weight: 700">
|
||||
@@ -155,7 +156,7 @@
|
||||
<div class="item" @click="showDrawerOnline">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<img src="../../assets/images/leveladd/zai.png"/>
|
||||
<img src="../../assets/images/leveladd/zai.png" />
|
||||
</div>
|
||||
<div class="text">在线</div>
|
||||
</div>
|
||||
@@ -178,7 +179,7 @@
|
||||
<div class="item" @click="showDrawerFaceteach">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<img src="../../assets/images/leveladd/mian.png"/>
|
||||
<img src="../../assets/images/leveladd/mian.png" />
|
||||
</div>
|
||||
<div class="text">面授</div>
|
||||
</div>
|
||||
@@ -201,7 +202,7 @@
|
||||
<div class="item" @click="showDrawerAddCase">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<img src="../../assets/images/leveladd/an.png"/>
|
||||
<img src="../../assets/images/leveladd/an.png" />
|
||||
</div>
|
||||
<div class="text">案例</div>
|
||||
</div>
|
||||
@@ -224,7 +225,7 @@
|
||||
<div class="item">
|
||||
<div class="itcon">
|
||||
<div class="img" @click="showDrawerAddHomework">
|
||||
<img src="../../assets/images/leveladd/zuo.png"/>
|
||||
<img src="../../assets/images/leveladd/zuo.png" />
|
||||
</div>
|
||||
<div class="text">作业</div>
|
||||
</div>
|
||||
@@ -247,7 +248,7 @@
|
||||
<div class="item" @click="showDrawerAddTest">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<img src="../../assets/images/leveladd/kao.png"/>
|
||||
<img src="../../assets/images/leveladd/kao.png" />
|
||||
</div>
|
||||
<div class="text">考试</div>
|
||||
</div>
|
||||
@@ -270,7 +271,7 @@
|
||||
<div class="item" @click="showDrawerAddLive">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<img src="../../assets/images/leveladd/zhi.png"/>
|
||||
<img src="../../assets/images/leveladd/zhi.png" />
|
||||
</div>
|
||||
<div class="text">直播</div>
|
||||
</div>
|
||||
@@ -293,7 +294,7 @@
|
||||
<div class="item" @click="showDrawerAddRef">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<img src="../../assets/images/leveladd/wai.png"/>
|
||||
<img src="../../assets/images/leveladd/wai.png" />
|
||||
</div>
|
||||
<div class="text">外链</div>
|
||||
</div>
|
||||
@@ -316,7 +317,7 @@
|
||||
<div class="item" @click="showDrawerAddDiscuss">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<img src="../../assets/images/leveladd/tao.png"/>
|
||||
<img src="../../assets/images/leveladd/tao.png" />
|
||||
</div>
|
||||
<div class="text">讨论</div>
|
||||
</div>
|
||||
@@ -339,7 +340,7 @@
|
||||
<div class="item" @click="showDrawerAddActive">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<img src="../../assets/images/leveladd/huo.png"/>
|
||||
<img src="../../assets/images/leveladd/huo.png" />
|
||||
</div>
|
||||
<div class="text">活动</div>
|
||||
</div>
|
||||
@@ -362,7 +363,7 @@
|
||||
<div class="item" @click="showDrawerAddEval">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<img src="../../assets/images/leveladd/ce.png"/>
|
||||
<img src="../../assets/images/leveladd/ce.png" />
|
||||
</div>
|
||||
<div class="text">测评</div>
|
||||
</div>
|
||||
@@ -385,7 +386,7 @@
|
||||
<div class="item" @click="showDrawerAddInvist">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<img src="../../assets/images/leveladd/diao.png"/>
|
||||
<img src="../../assets/images/leveladd/diao.png" />
|
||||
</div>
|
||||
<div class="text">评估</div>
|
||||
</div>
|
||||
@@ -408,7 +409,7 @@
|
||||
<div class="item" @click="showDrawerAddVote">
|
||||
<div class="itcon">
|
||||
<div class="img">
|
||||
<img src="../../assets/images/leveladd/tou.png"/>
|
||||
<img src="../../assets/images/leveladd/tou.png" />
|
||||
</div>
|
||||
<div class="text">投票</div>
|
||||
<!-- 添加投票侧弹窗 -->
|
||||
@@ -990,8 +991,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal
|
||||
>
|
||||
</a-modal>
|
||||
|
||||
<!-- 是否删除阶段弹窗 -->
|
||||
<a-modal
|
||||
@@ -1027,7 +1027,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {reactive, toRefs, onMounted, onUnmounted, onUpdated, watch} from "vue";
|
||||
import {
|
||||
reactive,
|
||||
toRefs,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
onUpdated,
|
||||
watch,
|
||||
} from "vue";
|
||||
import AddOnline from "../../components/drawers/AddOnline.vue";
|
||||
import AddFaceteach from "../../components/drawers/AddFaceteach.vue";
|
||||
import AddCase from "../../components/drawers/AddCase.vue";
|
||||
@@ -1040,15 +1047,13 @@ import AddActive from "../../components/drawers/AddActive.vue";
|
||||
import AddEval from "../../components/drawers/AddEval.vue";
|
||||
import AddInvist from "../../components/drawers/AddInvist.vue";
|
||||
import AddVote from "../../components/vote/AddVote.vue";
|
||||
import {message} from "ant-design-vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/indexTaskadd";
|
||||
import * as apistage from "../../api/indexStage";
|
||||
import * as apimove from "../../api/indexMovetask";
|
||||
import draggable from "vuedraggable";
|
||||
//import {storage} from "../../api/storage";
|
||||
// import UnlockMode from "../../components/drawers/UnlockMode.vue";
|
||||
// import * as api1 from "../../api/index1";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
export default {
|
||||
name: "TaskAdd",
|
||||
@@ -1160,8 +1165,8 @@ export default {
|
||||
};
|
||||
|
||||
watch(route, () => {
|
||||
console.log(route)
|
||||
})
|
||||
console.log(route);
|
||||
});
|
||||
|
||||
// 把数据放到state里
|
||||
const getTableData = (tableData) => {
|
||||
@@ -1243,14 +1248,14 @@ export default {
|
||||
width: 60,
|
||||
align: "left",
|
||||
className: "classify",
|
||||
scopedSlots: {customRender: "action"},
|
||||
scopedSlots: { customRender: "action" },
|
||||
customRender: (text) => {
|
||||
// console.log(text.record.checked1);
|
||||
return (
|
||||
<div class="racona">
|
||||
<div
|
||||
class="img"
|
||||
style={{cursor: "pointer"}}
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() => {
|
||||
console.log("点击了");
|
||||
}}
|
||||
@@ -1283,7 +1288,7 @@ export default {
|
||||
// width: 100,
|
||||
align: "center",
|
||||
className: "h",
|
||||
scopedSlots: {customRender: "action"},
|
||||
scopedSlots: { customRender: "action" },
|
||||
customRender: (text) => {
|
||||
// console.log(text.record.checked1);
|
||||
return (
|
||||
@@ -1330,7 +1335,7 @@ export default {
|
||||
key: "opacation",
|
||||
// width: 100,
|
||||
align: "center",
|
||||
scopedSlots: {customRender: "action"},
|
||||
scopedSlots: { customRender: "action" },
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="opa">
|
||||
@@ -1366,15 +1371,13 @@ export default {
|
||||
let obj = {
|
||||
projectId: state.projectId,
|
||||
};
|
||||
await api
|
||||
.getTask(obj)
|
||||
.then((res) => {
|
||||
await api.getTask(obj).then((res) => {
|
||||
console.log("22222", res.data.data.stageList);
|
||||
state.projectTitle = res.data.data.projectInfo.name;
|
||||
state.picUrl = res.data.data.projectInfo.picUrl;
|
||||
state.stageList = res.data.data.stageList;
|
||||
getStageData(res.data.data.stageList);
|
||||
updateStageChoosd()
|
||||
updateStageChoosd();
|
||||
// let leng = res.data.data.stageList.length;
|
||||
// if (leng > 0) {
|
||||
// let stage = localStorage.getItem("stageId") ? localStorage.getItem("stageId") : null;
|
||||
@@ -1442,7 +1445,7 @@ export default {
|
||||
// }
|
||||
// let final = state.level.find((item) => item.id == state.chooseStageId);
|
||||
// getTableData(final.taskList);
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
//获取修改、删除id(投票)
|
||||
@@ -1459,25 +1462,33 @@ export default {
|
||||
|
||||
//删除任务
|
||||
const deleteTask = async () => {
|
||||
await api.deleteTask({projectTaskIds: state.deleteID})
|
||||
await api.deleteTask({ projectTaskIds: state.deleteID });
|
||||
//删除后更新索引
|
||||
};
|
||||
|
||||
function updateStageChoosd() {
|
||||
console.log('updateStageChoosd')
|
||||
console.log(state.chooseStageId)
|
||||
if (state.chooseStageId && state.stageList.find(e => e.stageId == state.chooseStageId)) {
|
||||
getTableData(state.stageList.find(e => e.stageId == state.chooseStageId)?.taskList);
|
||||
return
|
||||
console.log("updateStageChoosd");
|
||||
console.log(state.chooseStageId);
|
||||
if (
|
||||
state.chooseStageId &&
|
||||
state.stageList.find((e) => e.stageId == state.chooseStageId)
|
||||
) {
|
||||
getTableData(
|
||||
state.stageList.find((e) => e.stageId == state.chooseStageId)
|
||||
?.taskList
|
||||
);
|
||||
return;
|
||||
}
|
||||
state.chooseStageId = ''
|
||||
const arr = state.stageList.filter(e => e.name);
|
||||
state.chooseStageId = "";
|
||||
const arr = state.stageList.filter((e) => e.name);
|
||||
arr && arr.length && (state.chooseStageId = arr[0].stageId);
|
||||
if (!state.chooseStageId) {
|
||||
getTableData(state.stageList[0].taskList)
|
||||
return
|
||||
getTableData(state.stageList[0].taskList);
|
||||
return;
|
||||
}
|
||||
getTableData(state.stageList.find(e => e.stageId == state.chooseStageId)?.taskList);
|
||||
getTableData(
|
||||
state.stageList.find((e) => e.stageId == state.chooseStageId)?.taskList
|
||||
);
|
||||
}
|
||||
|
||||
const showChangeModal = () => {
|
||||
@@ -1613,7 +1624,9 @@ export default {
|
||||
message.success("修改阶段成功");
|
||||
await getTask();
|
||||
state.chooseStageId = res.data.data.stageId;
|
||||
let final = state.level.find((item) => item.id == state.chooseStageId);
|
||||
let final = state.level.find(
|
||||
(item) => item.id == state.chooseStageId
|
||||
);
|
||||
getTableData(final.taskList);
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -1636,7 +1649,9 @@ export default {
|
||||
message.success("添加阶段成功");
|
||||
await getTask();
|
||||
state.chooseStageId = res.data.data.stageId;
|
||||
let final = state.level.find((item) => item.id == state.chooseStageId);
|
||||
let final = state.level.find(
|
||||
(item) => item.id == state.chooseStageId
|
||||
);
|
||||
getTableData(final.taskList);
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="taskpage">
|
||||
<div class="addhead" style="flex-shrink: 0">
|
||||
<div class="leftimg">
|
||||
<img class="img" :src="picUrl" />
|
||||
<img class="img" :src="picUrl"/>
|
||||
</div>
|
||||
<div class="imgfor">
|
||||
<div class="forz">{{ name }}</div>
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="fort">起止时间:{{ startTime }}至{{ endTime }}</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<img class="img1" src="../../assets/images/leveladd/ma.png" />
|
||||
<img class="img1" src="../../assets/images/leveladd/ma.png"/>
|
||||
<div class="line" v-if="action == 1 || action == 0"></div>
|
||||
<img
|
||||
v-if="action == 1 || action == 0"
|
||||
@@ -88,7 +88,7 @@
|
||||
<div class="line"></div>
|
||||
<router-link to="/projectmanage">
|
||||
<div style="display: flex">
|
||||
<img class="img2" src="../../assets/images/leveladd/back.png" />
|
||||
<img class="img2" src="../../assets/images/leveladd/back.png"/>
|
||||
<div class="return">返回</div>
|
||||
</div>
|
||||
</router-link>
|
||||
@@ -117,13 +117,13 @@
|
||||
style="background: linear-gradient(180deg, #fef3dd, #fffaf0)"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left1.png" />
|
||||
<img src="../../assets/images/taskpage/left1.png"/>
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture1.png" />
|
||||
<img src="../../assets/images/taskpage/picture1.png"/>
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right1.png" />
|
||||
<img src="../../assets/images/taskpage/right1.png"/>
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(255, 182, 78, 1)">
|
||||
添加任务
|
||||
@@ -136,13 +136,13 @@
|
||||
style="background: linear-gradient(180deg, #ddeaff, #f0f8fe)"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left2.png" />
|
||||
<img src="../../assets/images/taskpage/left2.png"/>
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture2.png" />
|
||||
<img src="../../assets/images/taskpage/picture2.png"/>
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right2.png" />
|
||||
<img src="../../assets/images/taskpage/right2.png"/>
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
|
||||
添加学员
|
||||
@@ -546,13 +546,13 @@
|
||||
v-if="taskSyllabus.length == 0"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left2.png" />
|
||||
<img src="../../assets/images/taskpage/left2.png"/>
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture8.png" />
|
||||
<img src="../../assets/images/taskpage/picture8.png"/>
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right2.png" />
|
||||
<img src="../../assets/images/taskpage/right2.png"/>
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
|
||||
创建任务
|
||||
@@ -575,13 +575,13 @@
|
||||
style="background: linear-gradient(180deg, #fef3dd, #fffaf0)"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left1.png" />
|
||||
<img src="../../assets/images/taskpage/left1.png"/>
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture1.png" />
|
||||
<img src="../../assets/images/taskpage/picture1.png"/>
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right1.png" />
|
||||
<img src="../../assets/images/taskpage/right1.png"/>
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(255, 182, 78, 1)">
|
||||
添加任务
|
||||
@@ -679,18 +679,18 @@
|
||||
</div>
|
||||
<div class="groupright">
|
||||
<div class="btn1" @click="searchStu">
|
||||
<img src="../../assets/images/courseManage/search0.png" />
|
||||
<img src="../../assets/images/courseManage/search0.png"/>
|
||||
<span class="btn1text">搜索</span>
|
||||
</div>
|
||||
<div class="btn2" @click="resetCancel">
|
||||
<img src="../../assets/images/courseManage/reset1.png" />
|
||||
<img src="../../assets/images/courseManage/reset1.png"/>
|
||||
<span class="btn2text">重置</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="second2" style="margin-top: 20px">
|
||||
<div class="btn1" @click="showStuAdd">
|
||||
<img src="../../assets/images/courseManage/add0.png" />
|
||||
<img src="../../assets/images/courseManage/add0.png"/>
|
||||
<span class="btn1text">添加学员</span>
|
||||
</div>
|
||||
<!-- 2022-11-30注释 后面放开 -->
|
||||
@@ -699,12 +699,12 @@
|
||||
<span class="btn2text">导入学员</span>
|
||||
</div> -->
|
||||
<div class="btn2" @click="showAllDelete">
|
||||
<img src="../../assets/images/projectadd/delete.png" />
|
||||
<img src="../../assets/images/projectadd/delete.png"/>
|
||||
<span class="btn2text">批量删除</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="talk">
|
||||
<img class="im" src="../../assets/images/leveladd/gan.png" />
|
||||
<img class="im" src="../../assets/images/leveladd/gan.png"/>
|
||||
<div class="xu">
|
||||
<span class="yi">已选择</span>
|
||||
<div style="width: 5px; display: inline-block"></div>
|
||||
@@ -767,18 +767,18 @@
|
||||
</div>
|
||||
<div class="groupright">
|
||||
<div class="btn1" @click="searchGroup">
|
||||
<img src="../../assets/images/courseManage/search0.png" />
|
||||
<img src="../../assets/images/courseManage/search0.png"/>
|
||||
<span class="btn1text">搜索</span>
|
||||
</div>
|
||||
<div class="btn2" @click="resetGroupName">
|
||||
<img src="../../assets/images/courseManage/reset1.png" />
|
||||
<img src="../../assets/images/courseManage/reset1.png"/>
|
||||
<span class="btn2text">重置</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="second2">
|
||||
<div class="btn1" @click="showModal2">
|
||||
<img src="../../assets/images/courseManage/add0.png" />
|
||||
<div class="btn1" @click="showModal2(1, null)">
|
||||
<img src="../../assets/images/courseManage/add0.png"/>
|
||||
<span class="btn1text">创建小组</span>
|
||||
</div>
|
||||
<!-- 2022-12-2注释 后面放开 -->
|
||||
@@ -803,7 +803,9 @@
|
||||
>. . .</span
|
||||
>
|
||||
<div class="moreItems">
|
||||
<div class="sammo">编辑</div>
|
||||
<div class="sammo" @click="showModal2(2, item)">
|
||||
编辑
|
||||
</div>
|
||||
<div
|
||||
class="sammo"
|
||||
@click="deleteGroupBtn(item.projectGroupId)"
|
||||
@@ -816,7 +818,7 @@
|
||||
<div class="leader">组长:{{ item.leaderName }}</div>
|
||||
<div class="grocenter">
|
||||
<div class="leader1">进度</div>
|
||||
<a-progress :percent="item.completeRatio" />
|
||||
<a-progress :percent="item.completeRatio"/>
|
||||
</div>
|
||||
<div
|
||||
class="grofooter"
|
||||
@@ -1176,7 +1178,7 @@
|
||||
:title="showFaceText"
|
||||
/>
|
||||
<!-- 学员(小组管理)创建小组抽屉 -->
|
||||
<subset-manage v-model:Svisible="subsetVisivle" />
|
||||
<subset-manage v-model:Svisible="subsetVisivle"/>
|
||||
<!-- 学员管理-添加学员抽屉 -->
|
||||
<!-- <stu-add v-model:Stuvisible="Stuvisible" /> -->
|
||||
<!-- 添加学员抽屉 -->
|
||||
@@ -1185,10 +1187,11 @@
|
||||
:selectProjectId="projectId"
|
||||
v-model:addAuthList="addAuthList"
|
||||
:authClassify="authClassify"
|
||||
classify="addstudent"
|
||||
classify="project"
|
||||
:type="2"
|
||||
/>
|
||||
<!-- 学员管理-导入学员抽屉 -->
|
||||
<import-stu v-model:Importvisible="Importvisible" />
|
||||
<import-stu v-model:Importvisible="Importvisible"/>
|
||||
<!-- 查看学员 传入查看学员的id-->
|
||||
<see-stu
|
||||
v-model:Seevisible="Seevisible"
|
||||
@@ -1211,9 +1214,9 @@
|
||||
v-model:projectId="projectId"
|
||||
/>
|
||||
<!-- 面授学员抽屉 -->
|
||||
<face-stu v-model:FSvisible="FSvisible" />
|
||||
<face-stu v-model:FSvisible="FSvisible"/>
|
||||
<!-- 活动考勤抽屉 -->
|
||||
<active-attendance v-model:AAvisible="AAvisible" :title="showkaoqinText" />
|
||||
<active-attendance v-model:AAvisible="AAvisible" :title="showkaoqinText"/>
|
||||
<!-- 作业管理抽屉 -->
|
||||
<work-manage
|
||||
v-model:Wvisible="Wvisible"
|
||||
@@ -1228,7 +1231,7 @@
|
||||
:itemsType="itemstype"
|
||||
/>
|
||||
<!-- 批量面授报名 -->
|
||||
<task-imp-stu v-model:TaskFaceImpStuvisible="TaskFaceImpStuvisible" />
|
||||
<task-imp-stu v-model:TaskFaceImpStuvisible="TaskFaceImpStuvisible"/>
|
||||
|
||||
<!-- 概览(无数据)-项目发布弹窗 -->
|
||||
<div>
|
||||
@@ -1287,7 +1290,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="send">
|
||||
<a-switch v-model:checked="checked" size="small" />
|
||||
<a-switch v-model:checked="checked" size="small"/>
|
||||
<span class="sendtext">发送项目通知</span>
|
||||
</div>
|
||||
<div class="ckb">
|
||||
@@ -1545,7 +1548,7 @@
|
||||
</a-modal>
|
||||
</div>
|
||||
<!-- 编辑项目弹窗 -->
|
||||
<proj-set v-model:editHs="editHs" v-model:projectId="projectId" />
|
||||
<proj-set v-model:editHs="editHs" v-model:projectId="projectId"/>
|
||||
|
||||
<!-- 二维码弹窗 -->
|
||||
<two-dimensional-code
|
||||
@@ -1730,9 +1733,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted, watch, computed } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useRouter } from "vue-router";
|
||||
import {reactive, toRefs, onMounted, watch, computed} from "vue";
|
||||
import {useRoute} from "vue-router";
|
||||
import {useRouter} from "vue-router";
|
||||
// import { CaretRightOutlined } from "@ant-design/icons-vue";
|
||||
import TimeManage from "../../components/drawers/TimeManage";
|
||||
import FaceManage from "../../components/drawers/FaceManage";
|
||||
@@ -1751,7 +1754,7 @@ import NoticePub from "../../components/drawers/NoticePub";
|
||||
import NoticeHis from "../../components/drawers/NoticeHis";
|
||||
// import ProjectScore from "../../components/drawers/ProjectScore";
|
||||
import TaskImpStu from "../../components/drawers/TaskFaceIn";
|
||||
import { storage } from "../../api/storage";
|
||||
import {storage} from "../../api/storage";
|
||||
import * as api from "../../api/index1";
|
||||
import * as apiproj from "../../api/index";
|
||||
import {
|
||||
@@ -1762,15 +1765,15 @@ import {
|
||||
editGroup,
|
||||
topStudent,
|
||||
} from "../../api/indexProjStu";
|
||||
import { message } from "ant-design-vue";
|
||||
import {message} from "ant-design-vue";
|
||||
import * as apitl from "../../api/index";
|
||||
import { getTask } from "../../api/indexTaskadd";
|
||||
import { editProj } from "../../api/indexTaskadd";
|
||||
import { toDate } from "../../api/method";
|
||||
import {getTask} from "../../api/indexTaskadd";
|
||||
import {editProj} from "../../api/indexTaskadd";
|
||||
import {toDate} from "../../api/method";
|
||||
import projSet from "../../components/Modals/projSet";
|
||||
import { overview } from "../../api/indexProjStu";
|
||||
import {overview} from "../../api/indexProjStu";
|
||||
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
|
||||
import { useStore } from "vuex";
|
||||
import {useStore} from "vuex";
|
||||
import ProjectLevel from "@/components/project/ProjectLevel";
|
||||
import TrainClass from "@/components/project/TrainClass";
|
||||
|
||||
@@ -1869,23 +1872,23 @@ export default {
|
||||
projectTaskId: "", //项目任务任务id
|
||||
//进度排行学员
|
||||
rankjindu: [
|
||||
{ value: "学员", label: "学员" },
|
||||
{ value: "小组", label: "小组" },
|
||||
{value: "学员", label: "学员"},
|
||||
{value: "小组", label: "小组"},
|
||||
],
|
||||
valuestu1: "学员",
|
||||
//进度排行阶段
|
||||
rankjieduan: [{ value: "第一阶段", label: "第一阶段" }],
|
||||
rankjieduan: [{value: "第一阶段", label: "第一阶段"}],
|
||||
valuestu2: "第一阶段",
|
||||
//积分排行
|
||||
rankxuefen: [
|
||||
{ value: "学员", label: "学员" },
|
||||
{ value: "小组", label: "小组" },
|
||||
{value: "学员", label: "学员"},
|
||||
{value: "小组", label: "小组"},
|
||||
],
|
||||
valuestu3: "学员",
|
||||
//学时排行
|
||||
rankxueshi: [
|
||||
{ value: "学员", label: "学员" },
|
||||
{ value: "小组", label: "小组" },
|
||||
{value: "学员", label: "学员"},
|
||||
{value: "小组", label: "小组"},
|
||||
],
|
||||
valuestu4: "学员",
|
||||
visible: false, //时间管理
|
||||
@@ -1935,6 +1938,8 @@ export default {
|
||||
valuestub: "", //学员管理部门
|
||||
valuestug: "", //学员小组管理名称
|
||||
valuestugroup: "", //学员管理小组名称
|
||||
projectGroupId: null, //是编辑小组id
|
||||
stuMemberClassify: null, //1:新建小组 2:编辑小组
|
||||
valueDate: "", //排行榜输入日期
|
||||
noticeChecked: true,
|
||||
noticeContent: "",
|
||||
@@ -2027,21 +2032,21 @@ export default {
|
||||
if (text.record.rank == "1") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
style={{width: 24, height: 24}}
|
||||
src={require("../../assets/images/taskpage/one.png")}
|
||||
/>
|
||||
);
|
||||
} else if (text.record.rank == "2") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
style={{width: 24, height: 24}}
|
||||
src={require("../../assets/images/taskpage/two.png")}
|
||||
/>
|
||||
);
|
||||
} else if (text.record.rank == "3") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
style={{width: 24, height: 24}}
|
||||
src={require("../../assets/images/taskpage/three.png")}
|
||||
/>
|
||||
);
|
||||
@@ -2134,21 +2139,21 @@ export default {
|
||||
if (text.record.rank == "1") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
style={{width: 24, height: 24}}
|
||||
src={require("../../assets/images/taskpage/one.png")}
|
||||
/>
|
||||
);
|
||||
} else if (text.record.rank == "2") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
style={{width: 24, height: 24}}
|
||||
src={require("../../assets/images/taskpage/two.png")}
|
||||
/>
|
||||
);
|
||||
} else if (text.record.rank == "3") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
style={{width: 24, height: 24}}
|
||||
src={require("../../assets/images/taskpage/three.png")}
|
||||
/>
|
||||
);
|
||||
@@ -2241,21 +2246,21 @@ export default {
|
||||
if (text.record.rank == "1") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
style={{width: 24, height: 24}}
|
||||
src={require("../../assets/images/taskpage/one.png")}
|
||||
/>
|
||||
);
|
||||
} else if (text.record.rank == "2") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
style={{width: 24, height: 24}}
|
||||
src={require("../../assets/images/taskpage/two.png")}
|
||||
/>
|
||||
);
|
||||
} else if (text.record.rank == "3") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
style={{width: 24, height: 24}}
|
||||
src={require("../../assets/images/taskpage/three.png")}
|
||||
/>
|
||||
);
|
||||
@@ -2641,11 +2646,23 @@ export default {
|
||||
state.canclestu1 = false;
|
||||
};
|
||||
|
||||
const showModal2 = () => {
|
||||
const showModal2 = (classify, item) => {
|
||||
state.stuMemberClassify = classify;
|
||||
state.projectGroupId =
|
||||
item && item.projectGroupId ? item.projectGroupId : null;
|
||||
state.stugroup = true;
|
||||
if (item) {
|
||||
state.valueaddg = item.groupName;
|
||||
state.valueaddm = item.leaderName;
|
||||
}
|
||||
console.log("编辑小组item", item);
|
||||
};
|
||||
const closeModal2 = () => {
|
||||
state.stugroup = false;
|
||||
state.valueaddg = null;
|
||||
state.valueaddm = null;
|
||||
state.projectGroupId = null;
|
||||
state.stuMemberClassify = null;
|
||||
};
|
||||
//点击确定创建小组
|
||||
const createG = () => {
|
||||
@@ -2654,7 +2671,7 @@ export default {
|
||||
return message.warning("请输入必填项");
|
||||
} else {
|
||||
createGroup();
|
||||
state.stugroup = false;
|
||||
closeModal2();
|
||||
}
|
||||
};
|
||||
const showFaceIn = () => {
|
||||
@@ -2961,7 +2978,7 @@ export default {
|
||||
// width: 60,
|
||||
align: "center",
|
||||
className: "h",
|
||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
||||
scopedSlots: {customRender: "action"}, //引入的插槽
|
||||
customRender: (text) => {
|
||||
// console.log(text);
|
||||
return (
|
||||
@@ -3233,6 +3250,7 @@ export default {
|
||||
array.push(obj);
|
||||
});
|
||||
state.groupList = array;
|
||||
console.log("编辑小组", state.groupList);
|
||||
};
|
||||
//学员搜索
|
||||
const searchStu = () => {
|
||||
@@ -3293,6 +3311,7 @@ export default {
|
||||
};
|
||||
//获取学员列表
|
||||
const getStu = (obj) => {
|
||||
state.loading = true;
|
||||
let objf = obj || {
|
||||
deptIds: [], //部门
|
||||
groupId: 0,
|
||||
@@ -3306,15 +3325,9 @@ export default {
|
||||
getProjStu(objf)
|
||||
.then((res) => {
|
||||
console.log("获取学员列表", res.data);
|
||||
if (res.data.code === 200) {
|
||||
let leng = res.data.data.rows.length;
|
||||
state.total = res.data.data.total;
|
||||
if (leng > 0) {
|
||||
let arr = res.data.data.rows;
|
||||
getTableDataList(arr);
|
||||
// studentData();
|
||||
}
|
||||
}
|
||||
state.loading = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -3392,11 +3405,14 @@ export default {
|
||||
getGroupList(objf)
|
||||
.then((res) => {
|
||||
console.log(res.data.data.rows, "获取小组列表成功");
|
||||
let leng = res.data.data.rows.length;
|
||||
if (leng > 0) {
|
||||
if (res.data.code === 200) {
|
||||
let arr = res.data.data.rows;
|
||||
setGroupList(arr);
|
||||
}
|
||||
// let leng = res.data.data.rows.length;
|
||||
// if (leng > 0) {
|
||||
|
||||
// }
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, "获取列表失败");
|
||||
@@ -3414,11 +3430,13 @@ export default {
|
||||
};
|
||||
//创建小组
|
||||
const createGroup = () => {
|
||||
//新建
|
||||
if (state.stuMemberClassify === 1) {
|
||||
let obj = {
|
||||
groupName: state.valueaddg,
|
||||
leaderId: 0,
|
||||
leaderName: state.valueaddm,
|
||||
projectGroupId: 0,
|
||||
// projectGroupId: 0,
|
||||
projectId: state.projectId,
|
||||
};
|
||||
editGroup(obj)
|
||||
@@ -3431,6 +3449,28 @@ export default {
|
||||
console.log("小组创建失败", err);
|
||||
message.warning("小组创建失败");
|
||||
});
|
||||
}
|
||||
//编辑
|
||||
if (state.stuMemberClassify === 2) {
|
||||
let obj = {
|
||||
groupName: state.valueaddg,
|
||||
leaderId: 0,
|
||||
leaderName: state.valueaddm,
|
||||
projectGroupId: state.projectGroupId,
|
||||
projectId: state.projectId,
|
||||
};
|
||||
console.log("编辑小组obj", obj);
|
||||
editGroup(obj)
|
||||
.then((res) => {
|
||||
console.log("小组编辑成功", res);
|
||||
message.success("小组编辑成功");
|
||||
getGroup();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("小组编辑失败", err);
|
||||
message.warning("小组编辑失败");
|
||||
});
|
||||
}
|
||||
};
|
||||
//搜索小组重置
|
||||
const resetGroupName = () => {
|
||||
@@ -3461,7 +3501,7 @@ export default {
|
||||
//start---------项目概览
|
||||
// 获取项目概览
|
||||
const getOverview = () => {
|
||||
overview({ projectId: state.projectId })
|
||||
overview({projectId: state.projectId})
|
||||
.then((res) => {
|
||||
Object.keys(res.data.data.projectInfoOverview).forEach((item) => {
|
||||
levelList.projectInfoOverview[item] =
|
||||
@@ -3485,7 +3525,7 @@ export default {
|
||||
};
|
||||
//end---------项目概览
|
||||
|
||||
const handleChange = ({ file, fileList }) => {
|
||||
const handleChange = ({file, fileList}) => {
|
||||
let list = [];
|
||||
if (file.status !== "uploading") {
|
||||
console.log("上传的list", fileList);
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, computed } from "vue";
|
||||
import { reactive, toRefs, computed, getCurrentInstance } from "vue";
|
||||
// import { message } from "ant-design-vue";
|
||||
// import { createResearch } from "../../api/indexResearch";
|
||||
import ResearchAddSingle from "./components/ResearchAddSingle.vue";
|
||||
@@ -121,6 +121,11 @@ export default {
|
||||
ResearchAddPin,
|
||||
},
|
||||
setup() {
|
||||
let { ctx: that } = getCurrentInstance();
|
||||
const reload = () => {
|
||||
that.$forceUpdate();
|
||||
};
|
||||
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
assessmentId: "", //编辑时候传
|
||||
@@ -153,8 +158,8 @@ export default {
|
||||
];
|
||||
sortBy(renderArr, "orderNumber"); //序号
|
||||
state.allFormsData = parseData(renderArr, "questionType"); //类型
|
||||
// console.log("state.allFormsData");
|
||||
// console.log(state.allFormsData);
|
||||
console.log("state.allFormsData11111111111");
|
||||
console.log(state.allFormsData);
|
||||
}
|
||||
};
|
||||
getInfoDate();
|
||||
@@ -360,7 +365,7 @@ export default {
|
||||
case 1:
|
||||
obj = {
|
||||
type,
|
||||
id: state.allFormsData.length,
|
||||
id: state.allFormsData.length + 1,
|
||||
valueSingle: "",
|
||||
singleList: [
|
||||
{
|
||||
@@ -374,7 +379,7 @@ export default {
|
||||
case 2:
|
||||
obj = {
|
||||
type,
|
||||
id: state.allFormsData.length,
|
||||
id: state.allFormsData.length + 1,
|
||||
valueMutil: "",
|
||||
mutilList: [
|
||||
{
|
||||
@@ -388,7 +393,7 @@ export default {
|
||||
case 3:
|
||||
obj = {
|
||||
type,
|
||||
id: state.allFormsData.length,
|
||||
id: state.allFormsData.length + 1,
|
||||
valueAsk: "",
|
||||
valueAskDesc: "",
|
||||
};
|
||||
@@ -396,7 +401,7 @@ export default {
|
||||
case 4:
|
||||
obj = {
|
||||
type,
|
||||
id: state.allFormsData.length,
|
||||
id: state.allFormsData.length + 1,
|
||||
valuePin: "",
|
||||
minScore: 1,
|
||||
maxScore: 10,
|
||||
@@ -412,15 +417,22 @@ export default {
|
||||
};
|
||||
|
||||
const handleDel = ({ id, type, curItem }) => {
|
||||
console.log(888888888);
|
||||
console.log(id);
|
||||
console.log(curItem);
|
||||
|
||||
state.allFormsData.forEach((item, index) => {
|
||||
if (item.id === id) {
|
||||
state.allFormsData.splice(index, 1);
|
||||
}
|
||||
});
|
||||
console.log(5656777777777);
|
||||
console.log(state.allFormsData);
|
||||
state.allFormsData.map((item, index) => {
|
||||
item.id = index + 1;
|
||||
return item;
|
||||
});
|
||||
reload();
|
||||
|
||||
if (type === 1) {
|
||||
console.log(11111);
|
||||
@@ -432,6 +444,7 @@ export default {
|
||||
}).then((res) => {
|
||||
console.log(56444);
|
||||
console.log(res);
|
||||
reload();
|
||||
});
|
||||
}
|
||||
if (type === 2) {
|
||||
@@ -444,6 +457,7 @@ export default {
|
||||
}).then((res) => {
|
||||
console.log(56444);
|
||||
console.log(res);
|
||||
reload();
|
||||
});
|
||||
}
|
||||
if (type === 3) {
|
||||
@@ -456,6 +470,7 @@ export default {
|
||||
}).then((res) => {
|
||||
console.log(56444);
|
||||
console.log(res);
|
||||
reload();
|
||||
});
|
||||
}
|
||||
if (type === 4) {
|
||||
@@ -468,6 +483,7 @@ export default {
|
||||
}).then((res) => {
|
||||
console.log(56444);
|
||||
console.log(res);
|
||||
reload();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
class="nameimg"
|
||||
src="../../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">标题</div>
|
||||
<div class="inname">标题{{ curItem.id }}</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
class="nameimg"
|
||||
src="../../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">标题</div>
|
||||
<div class="inname">标题{{ curItem.id }}</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
class="nameimg"
|
||||
src="../../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">标题</div>
|
||||
<div class="inname">标题{{ curItem.id }}</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
class="nameimg"
|
||||
src="../../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
<div class="inname">标题</div>
|
||||
<div class="inname">标题{{ curItem.id }}</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input
|
||||
@@ -80,6 +80,15 @@ export default {
|
||||
const curItem = ref(props.item);
|
||||
const assessmentId = ref(props.assessmentId);
|
||||
|
||||
// watch(
|
||||
// () => curItem,
|
||||
// (newVal) => {
|
||||
// console.log("6765555curItemcurItem");
|
||||
// console.log(newVal);
|
||||
// },
|
||||
// { deep: true }
|
||||
// );
|
||||
|
||||
const handleTypesDel = (type) => {
|
||||
emit("del", { id: curItem.value.id, type, curItem: curItem.value });
|
||||
// if (state.typesCur.includes(types)) {
|
||||
|
||||
Reference in New Issue
Block a user