feat:修改vue文件跳转

This commit is contained in:
lixg
2022-11-21 15:29:25 +08:00
parent e163cd5003
commit 386c6e6ee5
22 changed files with 3132 additions and 2801 deletions

View File

@@ -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" />
<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,7 +25,12 @@
<span style="margin-right: 3px">投票名称</span>
</div>
<div class="btnbox">
<a-input v-model:value="voteName" style="width: 424px; height: 32px" placeholder="请输入任务名称" maxlength="20" />
<a-input
v-model:value="voteName"
style="width: 424px; height: 32px"
placeholder="请输入任务名称"
maxlength="20"
/>
</div>
</div>
<div class="main_item">
@@ -28,25 +41,40 @@
<span>创建题干</span>
</div>
<div class="btnbox">
<button class="xkbtn" @click="handleTypes">
添加题干
</button>
<button class="xkbtn" @click="handleTypes">添加题干</button>
</div>
</div> <!-- 创建投票侧弹窗 -->
</div>
<!-- 创建投票侧弹窗 -->
</div>
<div v-for="(item, index) in allFormsData" :key="index">
<VoteQuestion :item="item" :ballotId="ballotId" @del="handleDel" />
</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
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
type="primary"
ghost
style="
width: 100px;
height: 40px;
margin-left: 14px;
border-radius: 8px;
"
@click="handleAllCancel"
>
取消
</a-button>
</div>
@@ -67,18 +95,15 @@ import {
// deepCloneFilterString,
} from "../../utils/utils";
//import store from "@/store";
import * as api from "@/api/indexVote";
import {} from "@/api/indexResearch";
//import { message } from "ant-design-vue";
export default {
name: "CreateVote",
components: {
VoteQuestion,
},
props: {
createVoteVisible: {
@@ -93,37 +118,35 @@ export default {
type: Boolean,
default: false,
},
},
setup(props, ctx) {
const state = reactive({
ballotId: "",
ballotName: "",
allFormsData: [],
});
const afterVisibleChange = () => {
handleTypes();
};
const closeDrawer = () => {
ctx.emit("update:createVoteVisible", false);
}
};
// 详情
const getInfoDate = async () => {
if (props.editChild) {
//stemId 多余字段
let res = await api.queryStemByStemId({
stemId: 0,
ballotId: state.ballotId,
}).then((res) => {
if (res.data.code === 200) {
return res.data.data;
}
});
let res = await api
.queryStemByStemId({
stemId: 0,
ballotId: state.ballotId,
})
.then((res) => {
if (res.data.code === 200) {
return res.data.data;
}
});
state.ballotName = res[0].ballotId;
let renderArr = [
...res,
];
let renderArr = [...res];
// sortBy(renderArr, "orderNumber"); //序号
state.allFormsData = parseData(renderArr); //类型
}
@@ -149,8 +172,6 @@ export default {
singleList: restList,
};
resultArr.push(obj);
});
resultArr.map((itm, idx) => {
itm.id = idx + 1;
@@ -345,7 +366,7 @@ export default {
if (res.data.code === 200) {
message.success("编辑成功");
router.push({
path: "/researchmanage",
path: "/manage/researchmanage",
});
}
});
@@ -370,7 +391,6 @@ export default {
};
const handleAllCancel = () => {
state.allFormsData = [];
};
/**
const checkVal = (filterData) => {
@@ -585,6 +605,5 @@ export default {
}
}
}
}
</style>