mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-23 09:46:45 +08:00
feat:隐藏功能
This commit is contained in:
@@ -1,49 +1,30 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="addevalVisible"
|
||||
class="drawerStyle addevalDrawer"
|
||||
width="80%"
|
||||
title="添加测评"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<a-drawer :visible="addevalVisible" class="drawerStyle addevalDrawer" width="80%" title="添加测评" placement="right"
|
||||
@after-visible-change="afterVisibleChange">
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">{{ edit ? "编辑" : "添加" }}测评</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer" />
|
||||
</div>
|
||||
<div class="contentMain">
|
||||
<div class="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 style="margin-right: 3px">选择测评:</span>
|
||||
</div>
|
||||
@@ -52,13 +33,9 @@
|
||||
选择测评
|
||||
</button>
|
||||
<span style="margin-left: 10px">
|
||||
<a-tag
|
||||
class="tag-style"
|
||||
v-if="evaluationTypeName !== ''"
|
||||
:closable="true"
|
||||
@close="delTag"
|
||||
>{{ evaluationTypeName }}</a-tag
|
||||
>
|
||||
<a-tag class="tag-style" v-if="evaluationTypeName !== ''" :closable="true" @close="delTag">{{
|
||||
evaluationTypeName
|
||||
}}</a-tag>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,12 +44,8 @@
|
||||
<span style="margin-right: 3px">有效期:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-range-picker
|
||||
style="width: 424px"
|
||||
v-model:value="time"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
<a-range-picker style="width: 424px" v-model:value="time" format="YYYY-MM-DD HH:mm:ss"
|
||||
:placeholder="[' 开始时间', ' 结束时间']" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item2">
|
||||
@@ -80,12 +53,9 @@
|
||||
<span style="margin-right: 3px">测评说明:</span>
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
v-model:value="description"
|
||||
placeholder="请输入测评说明"
|
||||
style="width: 424px; height: 120px"
|
||||
allowClear
|
||||
/>
|
||||
<a-textarea maxlength="150" v-model:value="description" placeholder="请输入测评说明"
|
||||
style="width: 424px; height: 120px" allowClear />
|
||||
<span style="position:relative;top:96px;left:-54px;z-index:9999;">{{ description.length }}/150</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -95,26 +65,23 @@
|
||||
<button class="btn2" @click="creoredit">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
<EvList
|
||||
v-model:EvalListVisible="EvalListVisible"
|
||||
v-model:evaluationTypeName="evaluationTypeName"
|
||||
@getEvListData="checkFinish"
|
||||
/>
|
||||
<EvList v-model:EvalListVisible="EvalListVisible" v-model:evaluationTypeName="evaluationTypeName"
|
||||
@getEvListData="checkFinish" />
|
||||
<!-- <div class="aeLoading" :style="{display:addLoading?'flex':'none'}">
|
||||
<a-spin :spinning="addLoading" tip="添加中..." />
|
||||
</div> -->
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import {reactive, toRefs} from "vue";
|
||||
import { reactive, toRefs } from "vue";
|
||||
// import { useRouter } from "vue-router";
|
||||
import EvList from "./EvList.vue";
|
||||
import * as api from "../../api/indexEval";
|
||||
import * as apitaskadd from "../../api/indexTaskadd";
|
||||
import {message} from "ant-design-vue";
|
||||
import {RouterEditTask} from "@/api/indexTask";
|
||||
import { message } from "ant-design-vue";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
import dayjs from "dayjs";
|
||||
import {addTempTask} from "../../api/indexTaskadd";
|
||||
import { addTempTask } from "../../api/indexTaskadd";
|
||||
|
||||
export default {
|
||||
name: "AddEval",
|
||||
@@ -170,7 +137,7 @@ export default {
|
||||
evaluationTypeId: null,
|
||||
evaluationTypeName: '',
|
||||
description: "",
|
||||
EvalListVisible: false,
|
||||
EvalListVisible: false
|
||||
// addLoading:false,
|
||||
});
|
||||
const checkFinish = (value) => {
|
||||
@@ -184,8 +151,8 @@ export default {
|
||||
state.time = undefined;
|
||||
state.description = "";
|
||||
state.evaluationTypeId = 0,
|
||||
state.evaluationTypeName = "",
|
||||
localStorage.setItem("stageId", props.chooseStageId);
|
||||
state.evaluationTypeName = "",
|
||||
localStorage.setItem("stageId", props.chooseStageId);
|
||||
localStorage.setItem("chapterId", props.isactive);
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
@@ -212,32 +179,32 @@ export default {
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 10,
|
||||
})
|
||||
.then(() => {
|
||||
//message.success(`${props.EditTestId ? "编辑" : "新增"}关卡任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
//message.error(`${props.EditTestId ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
.then(() => {
|
||||
//message.success(`${props.EditTestId ? "编辑" : "新增"}关卡任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
//message.error(`${props.EditTestId ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
await apitaskadd
|
||||
.addTask({
|
||||
duration: 0,
|
||||
flag: true,
|
||||
courseId: Number(value.evaluationId),
|
||||
name: value.evaluationName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId || 0,
|
||||
type: 10,
|
||||
})
|
||||
.then(() => {
|
||||
message.destroy()
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy()
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
.addTask({
|
||||
duration: 0,
|
||||
flag: true,
|
||||
courseId: Number(value.evaluationId),
|
||||
name: value.evaluationName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId || 0,
|
||||
type: 10,
|
||||
})
|
||||
.then(() => {
|
||||
message.destroy()
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy()
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
await addTempTask({
|
||||
courseId: Number(value.evaluationId),
|
||||
@@ -247,12 +214,12 @@ export default {
|
||||
stageId: props.chooseStageId || 0,
|
||||
type: 10,
|
||||
})
|
||||
.then(() => {
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
.then(() => {
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}
|
||||
};
|
||||
//根据id获取测评信息
|
||||
@@ -261,24 +228,24 @@ export default {
|
||||
evaluationId: props.EditEvalId,
|
||||
};
|
||||
api
|
||||
.queryEvaluationDetailById(objqi)
|
||||
.then((res) => {
|
||||
message.destroy()
|
||||
message.success("获取测评信息成功");
|
||||
state.inputV1 = res.data.data.evaluationName
|
||||
state.evaluationTypeName = res.data.data.evaluationTypeName
|
||||
state.evaluationTypeId = res.data.data.evaluationTypeId;
|
||||
state.time = res.data.data.evaluationStartTime ? [
|
||||
dayjs(res.data.data.evaluationStartTime, "YYYY-MM-DD"),
|
||||
dayjs(res.data.data.evaluationEndTime, "YYYY-MM-DD"),
|
||||
] : undefined;
|
||||
state.description = res.data.data.evaluationExplain
|
||||
})
|
||||
.catch((err) => {
|
||||
message.destroy()
|
||||
message.error("获取测量平信息失败");
|
||||
console.log(err, "erererrerererererer");
|
||||
});
|
||||
.queryEvaluationDetailById(objqi)
|
||||
.then((res) => {
|
||||
message.destroy()
|
||||
message.success("获取测评信息成功");
|
||||
state.inputV1 = res.data.data.evaluationName
|
||||
state.evaluationTypeName = res.data.data.evaluationTypeName
|
||||
state.evaluationTypeId = res.data.data.evaluationTypeId;
|
||||
state.time = res.data.data.evaluationStartTime ? [
|
||||
dayjs(res.data.data.evaluationStartTime, "YYYY-MM-DD"),
|
||||
dayjs(res.data.data.evaluationEndTime, "YYYY-MM-DD"),
|
||||
] : undefined;
|
||||
state.description = res.data.data.evaluationExplain
|
||||
})
|
||||
.catch((err) => {
|
||||
message.destroy()
|
||||
message.error("获取测量平信息失败");
|
||||
console.log(err, "erererrerererererer");
|
||||
});
|
||||
}
|
||||
const creoredit = () => {
|
||||
if (props.edit) {
|
||||
@@ -287,6 +254,7 @@ export default {
|
||||
createEvalText()
|
||||
}
|
||||
}
|
||||
|
||||
const editInvistText = () => {
|
||||
if (!state.inputV1) {
|
||||
message.destroy();
|
||||
@@ -309,18 +277,18 @@ export default {
|
||||
updateTime: "",
|
||||
};
|
||||
api
|
||||
.updateEvaluation(objei)
|
||||
.then(async (res) => {
|
||||
await updateTask(res.data.data);
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
message.destroy();
|
||||
message.success("创建测评成功");
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.success("创建测评失败");
|
||||
});
|
||||
.updateEvaluation(objei)
|
||||
.then(async (res) => {
|
||||
await updateTask(res.data.data);
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
message.destroy();
|
||||
message.success("创建测评成功");
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.success("创建测评失败");
|
||||
});
|
||||
}
|
||||
//创建测评信息
|
||||
const createEvalText = () => {
|
||||
@@ -346,18 +314,18 @@ export default {
|
||||
updateTime: "",
|
||||
};
|
||||
api
|
||||
.createEvaluation(obj)
|
||||
.then(async (res) => {
|
||||
await updateTask(res.data.data);
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
message.destroy();
|
||||
message.success("创建测评成功");
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.success("创建测评失败");
|
||||
});
|
||||
.createEvaluation(obj)
|
||||
.then(async (res) => {
|
||||
await updateTask(res.data.data);
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
message.destroy();
|
||||
message.success("创建测评成功");
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.success("创建测评失败");
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -372,7 +340,7 @@ export default {
|
||||
queryInvistById,
|
||||
editInvistText,
|
||||
showEvalDrawer,
|
||||
updateTask,
|
||||
updateTask
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -46,10 +46,11 @@
|
||||
<div class="img3"></div>
|
||||
<div class="wz">批量删除</div>
|
||||
</div>
|
||||
<div class="btn btn2">
|
||||
<!-- 2022-11-30注释 后面放开 -->
|
||||
<!-- <div class="btn btn2">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">导出信息</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="inline">
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<a-drawer :visible="ProjAuditvisible" class="drawerStyle ProjectAudit" placement="right" width="60%"
|
||||
@after-visible-change="afterVisibleChange">
|
||||
@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" />
|
||||
@click="closeDrawer"/>
|
||||
</div>
|
||||
<div class="main" style="padding-right: 10px">
|
||||
<a-tabs v-model:activeKey="activeSetKey">
|
||||
@@ -15,62 +15,78 @@
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>项目名称:</span></div>
|
||||
<div class="setc_main">
|
||||
<span style="color: #999999">{{ name }}</span>
|
||||
<span style="color: #999999">{{ projectInfo.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>封面图:</span></div>
|
||||
<div class="setc_main">
|
||||
<img style="width: 151px; height: 84px" :src="picUrl" alt="" />
|
||||
<img style="width: 151px; height: 84px" :src="projectInfo.picUrl" alt=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>项目时间:</span></div>
|
||||
<div class="setc_main">
|
||||
<span style="color: #999999">{{ startTime }} ~ {{ endTime }}</span>
|
||||
<span style="color: #999999">{{ projectInfo.beginTime }} ~ {{ projectInfo.endTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>项目经理:</span></div>
|
||||
<div class="setc_main">
|
||||
<span style="color: #999999">{{ manager }}</span>
|
||||
<span style="color: #999999">{{ projectInfo.manager }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>资源归属:</span></div>
|
||||
<div class="setc_main">
|
||||
<span style="color: #999999">{{ sourceBelongName }}</span>
|
||||
<span style="color: #999999">{{ projectInfo.sourceBelongName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>项目说明:</span></div>
|
||||
<div class="setc_main">
|
||||
<span style="color: #999999">{{ remark }}</span>
|
||||
<span style="color: #999999">{{ projectInfo.remark }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>同步学习记录:</span></div>
|
||||
<div class="setc_main">
|
||||
<a-radio v-model:checked="checkedSty"><span
|
||||
style="color: #333333">同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span></a-radio>
|
||||
<a-switch
|
||||
v-model:checked="projectInfo.courseSyncFlag"
|
||||
:checkedValue="1"
|
||||
:unCheckedValue="0"
|
||||
:disabled="true"
|
||||
><span
|
||||
style="
|
||||
width: 100%;
|
||||
color: rgba(109, 117, 132, 1);
|
||||
font-size: 14px;
|
||||
"
|
||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||
></a-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>项目级别:</span></div>
|
||||
<div class="setc_main">
|
||||
<span style="color: #999999">{{ level }}</span>
|
||||
<ProjectLevel v-model:value="projectInfo.level" :disabled="true"></ProjectLevel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>培训体系:</span></div>
|
||||
<div class="setc_main">
|
||||
<span style="color: #999999">{{ systemId }}</span>
|
||||
<TrainClass v-model:value="projectInfo.systemId" :disabled="true"></TrainClass>
|
||||
</div>
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="setc_name"><span>是否BOEU实施:</span></div>
|
||||
<div class="setc_main">
|
||||
<a-radio v-model:checked="checkedBOEU"><span style="color: #333333">BOEU实施</span></a-radio>
|
||||
<a-switch
|
||||
v-model:checked="projectInfo.boeFlag"
|
||||
:checkedValue="1"
|
||||
:unCheckedValue="0"
|
||||
:disabled="true"
|
||||
></a-switch>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -96,11 +112,11 @@
|
||||
</div>
|
||||
<div class="set_content">
|
||||
<div class="sign" style="position:relative;left:70px;top:-3px;">
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||
<img src="@/assets/images/coursewareManage/asterisk.png" alt=""/>
|
||||
</div>
|
||||
<div class="setc_name"><span>审核意见:</span></div>
|
||||
<div class="setc_main">
|
||||
<a-textarea v-model:value="valueSuggest" :rows="4" />
|
||||
<a-textarea v-model:value="valueSuggest" :rows="4"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -115,15 +131,20 @@
|
||||
|
||||
<script>
|
||||
import {toRefs, reactive, onMounted} from "vue";
|
||||
import { getTask } from "../../api/indexTaskadd";
|
||||
import { toDate } from "../../api/method";
|
||||
import { auditView } from "../../api/indexAudit";
|
||||
import { message } from "ant-design-vue";
|
||||
import {getTask} from "../../api/indexTaskadd";
|
||||
import {toDate} from "../../api/method";
|
||||
import {auditView} from "../../api/indexAudit";
|
||||
import {message} from "ant-design-vue";
|
||||
import * as api1 from "@/api/index1";
|
||||
import ProjectLevel from "@/components/project/ProjectLevel";
|
||||
import TrainClass from "@/components/project/TrainClass";
|
||||
|
||||
export default {
|
||||
name: "ProjectAudit",
|
||||
components: {},
|
||||
components: {
|
||||
ProjectLevel,
|
||||
TrainClass,
|
||||
},
|
||||
props: {
|
||||
ProjAuditvisible: {
|
||||
type: Boolean,
|
||||
@@ -181,8 +202,9 @@ export default {
|
||||
noticeFlag: null, //未改
|
||||
templateId: null, //未改
|
||||
attach: null,
|
||||
calssifyList:[],
|
||||
faceclassScene:[]
|
||||
calssifyList: [],
|
||||
faceclassScene: [],
|
||||
projectInfo: {}
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
@@ -199,6 +221,7 @@ export default {
|
||||
projectId: props.chooseProject,
|
||||
}).then((res) => {
|
||||
console.log("get task", res.data.data);
|
||||
state.projectInfo = res.data.data.projectInfo;
|
||||
let info = res.data.data.projectInfo;
|
||||
let start = toDate(info.beginTime / 1000, "Y-M-D h:m");
|
||||
let end = toDate(info.endTime / 1000, "Y-M-D h:m");
|
||||
@@ -212,26 +235,26 @@ export default {
|
||||
state.manager = info.manager;
|
||||
state.remark = info.remark;
|
||||
state.level =
|
||||
info.level == 1
|
||||
? "集团级"
|
||||
: info.level == 2
|
||||
? "组织级"
|
||||
: info.level == 3
|
||||
? "现地级"
|
||||
: info.level == 4
|
||||
? "部门级"
|
||||
: "-";
|
||||
info.level == 1
|
||||
? "集团级"
|
||||
: info.level == 2
|
||||
? "组织级"
|
||||
: info.level == 3
|
||||
? "现地级"
|
||||
: info.level == 4
|
||||
? "部门级"
|
||||
: "-";
|
||||
state.tlevel = info.level;
|
||||
state.systemId =
|
||||
info.systemId == 1
|
||||
? "集团级"
|
||||
: info.systemId == 2
|
||||
? "组织级"
|
||||
: info.systemId == 3
|
||||
? "现地级"
|
||||
: info.systemId == 4
|
||||
? "部门级"
|
||||
: "-";
|
||||
info.systemId == 1
|
||||
? "集团级"
|
||||
: info.systemId == 2
|
||||
? "组织级"
|
||||
: info.systemId == 3
|
||||
? "现地级"
|
||||
: info.systemId == 4
|
||||
? "部门级"
|
||||
: "-";
|
||||
state.tsystemId = info.systemId;
|
||||
state.checkedSty = info.courseSyncFlag == 1 ? true : false;
|
||||
state.courseSyncFlag = info.courseSyncFlag;
|
||||
@@ -247,13 +270,13 @@ export default {
|
||||
// state.attach = info.attach;
|
||||
// state.templateId = info.templateId;
|
||||
state.sourceBelong =
|
||||
info.sourceBelongId == 1
|
||||
? "项目一"
|
||||
: info.sourceBelongId == 2
|
||||
? "项目二"
|
||||
: info.sourceBelongId == 3
|
||||
? "项目三"
|
||||
: "-";
|
||||
info.sourceBelongId == 1
|
||||
? "项目一"
|
||||
: info.sourceBelongId == 2
|
||||
? "项目二"
|
||||
: info.sourceBelongId == 3
|
||||
? "项目三"
|
||||
: "-";
|
||||
});
|
||||
};
|
||||
|
||||
@@ -264,7 +287,7 @@ export default {
|
||||
state.showDetail = !state.showDetail;
|
||||
};
|
||||
const subMit = () => {
|
||||
if(!state.valueSuggest){
|
||||
if (!state.valueSuggest) {
|
||||
message.error(`请输入审核意见!`);
|
||||
return
|
||||
}
|
||||
@@ -276,16 +299,16 @@ export default {
|
||||
pass: state.valuePass == "1" ? 1 : -1,
|
||||
projectId: props.chooseProject,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("提交成功", res);
|
||||
message.destroy();
|
||||
message.success("提交成功");
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.warning("提交失败");
|
||||
});
|
||||
.then((res) => {
|
||||
console.log("提交成功", res);
|
||||
message.destroy();
|
||||
message.success("提交成功");
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
message.warning("提交失败");
|
||||
});
|
||||
};
|
||||
const getDictList = async (param) => api1.getDict({
|
||||
pageNo: 1,
|
||||
@@ -293,8 +316,8 @@ export default {
|
||||
setCode: param
|
||||
}).then((res) => res.data.data.rows)
|
||||
onMounted(async () => {
|
||||
state.calssifyList = (await getDictList("faceclassClass")).map(e => ({ label: e.dictName, value: e.dictCode })) //内容
|
||||
state.faceclassScene = (await getDictList("faceclassScene")).map(e => ({ label: e.dictName, value: e.dictCode })) //场景
|
||||
state.calssifyList = (await getDictList("faceclassClass")).map(e => ({label: e.dictName, value: e.dictCode})) //内容
|
||||
state.faceclassScene = (await getDictList("faceclassScene")).map(e => ({label: e.dictName, value: e.dictCode})) //场景
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
|
||||
@@ -46,9 +46,15 @@ export default {
|
||||
watch(state.id, () => {
|
||||
ctx.emit('update:modelValue', state.id)
|
||||
})
|
||||
onMounted(() => {
|
||||
state.options = [{id: props.modelValue, name: props.name}, ...store.state.orgtreeList]
|
||||
watch(props, () => {
|
||||
if (props.modelValue !== state.id) {
|
||||
state.id = props.modelValue
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
state.options = [...store.state.orgtreeList]
|
||||
})
|
||||
|
||||
function change(key, obj) {
|
||||
ctx.emit('update:name', obj[0])
|
||||
}
|
||||
|
||||
@@ -33,6 +33,13 @@ export default {
|
||||
options: [],
|
||||
id: props.modelValue
|
||||
});
|
||||
|
||||
watch(props, () => {
|
||||
if (props.modelValue !== state.id) {
|
||||
state.id = props.modelValue
|
||||
}
|
||||
})
|
||||
|
||||
watch(state.id,()=>{
|
||||
ctx.emit('update:modelValue',state.id)
|
||||
})
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
</a-select>
|
||||
</template>
|
||||
<script>
|
||||
import {reactive, toRefs, watch} from "vue";
|
||||
import {scrollLoad} from "@/api/method";
|
||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
||||
import {scrollLoad, throttle} from "@/api/method";
|
||||
import * as api1 from "@/api/index1";
|
||||
|
||||
export default {
|
||||
@@ -46,21 +46,36 @@ export default {
|
||||
loading: false,
|
||||
init: false
|
||||
});
|
||||
const getMemberThrottle = throttle(getMember, 500)
|
||||
|
||||
watch(() => state.memberParam, getMember)
|
||||
watch(() => props.value, init)
|
||||
watch(() => state.memberParam, getMemberThrottle)
|
||||
watch(props, init)
|
||||
|
||||
onMounted(() => {
|
||||
console.log('onMounted')
|
||||
init()
|
||||
})
|
||||
|
||||
function getMember() {
|
||||
state.loading = true
|
||||
state.options = []
|
||||
getMemberData()
|
||||
}
|
||||
|
||||
|
||||
function getMemberData() {
|
||||
api1.getMemberInfo(state.memberParam).then((res) => {
|
||||
const list = res.data.data.rows.filter(e => !props.value?.includes(e.id + '')).map(e => ({
|
||||
label: e.realName,
|
||||
value: e.id
|
||||
}));
|
||||
state.options.push(...list)
|
||||
if (state.memberParam.pageNo === 1 && props.value) {
|
||||
const arrManagerId = props.value.split(',')
|
||||
const arrManager = props.name.split(',')
|
||||
state.options = [...arrManager.map((e, i) => ({label: e, value: arrManagerId[i]})), ...list]
|
||||
} else state.options.push(...list)
|
||||
state.loading = false
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
const memberScroll = (e) => {
|
||||
@@ -77,13 +92,25 @@ export default {
|
||||
};
|
||||
|
||||
function init() {
|
||||
if (props.value && props.name) {
|
||||
const arrManager = props.name.split(',')
|
||||
const arrManagerId = props.value.split(',')
|
||||
state.managerArray = arrManagerId
|
||||
state.options = arrManager.map((e, i) => ({label: e, value: arrManagerId[i]}))
|
||||
state.init = true
|
||||
getMember()
|
||||
console.log('init--', props)
|
||||
if (props.value !== state.managerArray.join(',')) {
|
||||
if (props.value) {
|
||||
const arrManager = props.name.split(',')
|
||||
const arrManagerId = props.value.split(',')
|
||||
state.managerArray = arrManagerId
|
||||
state.options = arrManager.map((e, i) => ({label: e, value: arrManagerId[i]}))
|
||||
} else {
|
||||
state.managerArray = []
|
||||
}
|
||||
getMemberData()
|
||||
return;
|
||||
}
|
||||
if (!props.value) {
|
||||
if (!(state.options && state.options.length)) {
|
||||
state.options = []
|
||||
getMember()
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,14 @@ export default {
|
||||
watch(state.id, () => {
|
||||
ctx.emit('update:modelValue', state.id)
|
||||
})
|
||||
|
||||
watch(props, () => {
|
||||
if (props.modelValue !== state.id) {
|
||||
state.id = props.modelValue
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
state.options = store.state.projectSys.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
|
||||
})
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
<span style="margin-right: 3px">基础投票数:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-upload @change="handleChange" :multiple="true" :max-count="1" action="/manageApi/vote/baseVoteupload"
|
||||
v-model:file-list="fileList">
|
||||
<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
|
||||
@@ -218,7 +218,23 @@ export default {
|
||||
|
||||
};
|
||||
|
||||
// 限制文件格式上传
|
||||
const beforeUpload = (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("请上传正确的文件格式")
|
||||
|
||||
console.log(state.fileList)
|
||||
|
||||
state.fileList = []
|
||||
return
|
||||
}
|
||||
|
||||
let resFileList = [...info.fileList];
|
||||
|
||||
|
||||
@@ -353,9 +369,9 @@ export default {
|
||||
if (props.edit) {
|
||||
api
|
||||
.editVote(obj)
|
||||
.then(async(res) => {
|
||||
.then(async (res) => {
|
||||
console.log("updte======");
|
||||
await updateToTask(res);
|
||||
await updateToTask(res);
|
||||
closeDrawer();
|
||||
message.destroy();
|
||||
message.success("修改投票信息成功")
|
||||
@@ -367,7 +383,7 @@ export default {
|
||||
} else {
|
||||
api
|
||||
.createVote(obj)
|
||||
.then(async(res) => {
|
||||
.then(async (res) => {
|
||||
await updateToTask(res);
|
||||
closeDrawer();
|
||||
message.destroy();
|
||||
@@ -401,6 +417,7 @@ export default {
|
||||
queryStem,
|
||||
closeStem,
|
||||
handleChange,
|
||||
beforeUpload,
|
||||
log,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user