mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 11:26:45 +08:00
测评上传
This commit is contained in:
23
src/api/evaluation.js
Normal file
23
src/api/evaluation.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// 测评上传
|
||||||
|
import http from "./configPublic";
|
||||||
|
const ACTIVITYAPI = '/activityApi'
|
||||||
|
import {getCookieForName} from "@/api/method";
|
||||||
|
//查询测评
|
||||||
|
export const list = (obj) => http.post(`${ACTIVITYAPI}/evaluation/list`,obj)
|
||||||
|
//导入
|
||||||
|
export const importList = (obj) => http.post(`${ACTIVITYAPI}/evaluation/import`,obj, {
|
||||||
|
headers: { "Content-Type": "multipart/form-data",token:getCookieForName("token") },
|
||||||
|
})
|
||||||
|
//保存
|
||||||
|
export const save = (obj) => http.post(`${ACTIVITYAPI}/evaluation/save`,obj)
|
||||||
|
//保存测评详情
|
||||||
|
export const saveEvaluationDetail = (obj) => http.post(`${ACTIVITYAPI}/evaluation/detail/saveEvaluationDetail`,obj)
|
||||||
|
// export const save = (obj) => http.post(`${ACTIVITYAPI}/evaluation/save`,obj)
|
||||||
|
//测评封面上传
|
||||||
|
export const uploadImage = (obj) => http.post(`${ACTIVITYAPI}/evaluation/upload-image`,obj)
|
||||||
|
//测评总下载
|
||||||
|
export const downloadAll = (obj) => http.post(`${ACTIVITYAPI}/evaluation/detaildownload`,obj)
|
||||||
|
//权限管理
|
||||||
|
export const adminList = (obj) => http.post(`${ACTIVITYAPI}/permission/adminList`,obj)
|
||||||
|
//权限启用
|
||||||
|
export const updateStatus = (obj) => http.post(`${ACTIVITYAPI}/permission/updateStatus`,obj)
|
||||||
@@ -544,7 +544,7 @@
|
|||||||
name: "测评",
|
name: "测评",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '测评上传'
|
name: '测评报告'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -556,6 +556,9 @@
|
|||||||
{
|
{
|
||||||
name: '测评报告'
|
name: '测评报告'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: route.query.name
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (n.indexOf("/download") !== -1 || n.indexOf("/download") !== -1) {
|
if (n.indexOf("/download") !== -1 || n.indexOf("/download") !== -1) {
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { ref,onMounted, reactive,toRefs,computed } from "vue";
|
import { ref,onMounted, reactive,toRefs,computed } from "vue";
|
||||||
import dialog from "@/utils/dialog";
|
import dialog from "@/utils/dialog";
|
||||||
|
import { saveAdmin } from "@/api/evaluation";
|
||||||
export default {
|
export default {
|
||||||
name: "evadown",
|
name: "evadown",
|
||||||
components: {},
|
components: {},
|
||||||
@@ -72,7 +73,7 @@ import dialog from "@/utils/dialog";
|
|||||||
searchName: '',
|
searchName: '',
|
||||||
tableData:[
|
tableData:[
|
||||||
{
|
{
|
||||||
name:',,',
|
name:'111',
|
||||||
jobId:'111',
|
jobId:'111',
|
||||||
evaluationName:'aaaaa',
|
evaluationName:'aaaaa',
|
||||||
uploader:'eeeee',
|
uploader:'eeeee',
|
||||||
@@ -156,6 +157,7 @@ import dialog from "@/utils/dialog";
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log('aaa')})
|
console.log('aaa')})
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -27,12 +27,12 @@
|
|||||||
>
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="headers_item btn">
|
<div class="headers_item btn" @click="serchList">
|
||||||
<div class="headers_item_btn btn1">
|
<div class="headers_item_btn btn1">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">搜索</div>
|
<div class="btnText">搜索</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="headers_item_btn btn2">
|
<div class="headers_item_btn btn2" @click="serchListNo">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">重置</div>
|
<div class="btnText">重置</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -62,25 +62,21 @@
|
|||||||
<span class="upload"></span>
|
<span class="upload"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button type="link">
|
<a-button type="link" @click="downloadAll(record)">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>下载</template>
|
<template #title>下载</template>
|
||||||
<span class="download"></span>
|
<span class="download"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</a-button>
|
</a-button>
|
||||||
<DropDown value="更多">
|
<DropDown value="更多">
|
||||||
<a-button type="link" class="btn_item" @click="openRemarks(record)">
|
<a-button type="link" class="btn_item" @click="openEdit(record)">
|
||||||
<span class="release"></span>
|
<span class="release"></span>
|
||||||
修改备注
|
编辑
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button type="link" class="btn_item" @click="authorityItem(record)">
|
<a-button type="link" class="btn_item" @click="authorityItem(record)">
|
||||||
<span class="authority"></span>
|
<span class="authority"></span>
|
||||||
权限设置
|
权限设置
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button type="link" class="btn_item" @click="editName(record)">
|
|
||||||
<span class="edit"></span>
|
|
||||||
修改测评
|
|
||||||
</a-button>
|
|
||||||
<a-button type="link" class="btn_item" @click="deleteItem(record)">
|
<a-button type="link" class="btn_item" @click="deleteItem(record)">
|
||||||
<span class="delete"></span>
|
<span class="delete"></span>
|
||||||
删除
|
删除
|
||||||
@@ -100,8 +96,8 @@
|
|||||||
:showSizeChanger="true"
|
:showSizeChanger="true"
|
||||||
:showQuickJumper="false"
|
:showQuickJumper="false"
|
||||||
:hideOnSinglePage="true"
|
:hideOnSinglePage="true"
|
||||||
:pageSize="pageSize"
|
:pageSize="searchParam.pageSize"
|
||||||
v-model:current="searchParam.pageNo"
|
:current="searchParam.pageNo"
|
||||||
:total="tableDataTotal"
|
:total="tableDataTotal"
|
||||||
class="pagination"
|
class="pagination"
|
||||||
@change="changePagination"
|
@change="changePagination"
|
||||||
@@ -122,7 +118,7 @@
|
|||||||
<div class="bg_main">
|
<div class="bg_main">
|
||||||
<div class="bg_main_header">
|
<div class="bg_main_header">
|
||||||
<div class="bg_main_header_icon"></div>
|
<div class="bg_main_header_icon"></div>
|
||||||
<div>测评报告上传</div>
|
<div>测评报告{{formData.id&&btShow?'编辑':'上传'}}</div>
|
||||||
<div class="bg_main_header_close" @click="of_exit"></div>
|
<div class="bg_main_header_close" @click="of_exit"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg_body">
|
<div class="bg_body">
|
||||||
@@ -137,15 +133,11 @@
|
|||||||
<span>测评标题</span>
|
<span>测评标题</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg_body_input">
|
<div class="bg_body_input">
|
||||||
<NameInput
|
<a-input
|
||||||
ref="nameRef"
|
v-model:value="formData.evaluationName"
|
||||||
placeholder="请输入测评标题(限60个字以内)"
|
|
||||||
v-model:value="formData.assessmentName"
|
|
||||||
v-model:validated="formData.validated"
|
|
||||||
:id="formData.id"
|
|
||||||
:maxlength="60"
|
|
||||||
show-count
|
show-count
|
||||||
></NameInput>
|
:maxlength="60"
|
||||||
|
placeholder="请输入测评标题(限60个字以内)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg_body_bt" v-if="btShow">
|
<div class="bg_body_bt" v-if="btShow">
|
||||||
@@ -169,7 +161,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg_body_bt">
|
<div class="bg_body_bt" v-if="btShowEdit">
|
||||||
<div class="bg_body_bttext">上传说明</div>
|
<div class="bg_body_bttext">上传说明</div>
|
||||||
<div class="bg_body_input">
|
<div class="bg_body_input">
|
||||||
<span style="color: #999ba3">
|
<span style="color: #999ba3">
|
||||||
@@ -178,7 +170,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg_body_bt">
|
<div class="bg_body_bt" v-if="btShowEdit">
|
||||||
<div class="bg_body_bttext">
|
<div class="bg_body_bttext">
|
||||||
<div class="bg_body_btimg">
|
<div class="bg_body_btimg">
|
||||||
<img
|
<img
|
||||||
@@ -191,17 +183,19 @@
|
|||||||
<div class="bg_body_input">
|
<div class="bg_body_input">
|
||||||
<a-upload
|
<a-upload
|
||||||
name="file"
|
name="file"
|
||||||
:show-upload-list="false"
|
:file-list="filesList"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
:before-upload="beforeUpload3"
|
:before-upload="beforeUpload3"
|
||||||
>
|
>
|
||||||
|
<!-- action="/activityApi/evaluation/import"
|
||||||
|
@change="handleChange" -->
|
||||||
<div class="upload_box">
|
<div class="upload_box">
|
||||||
<span>选择文件</span>
|
<span>选择文件</span>
|
||||||
</div>
|
</div>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg_body_bt" style="justify-content: flex-start;">
|
<!-- <div class="bg_body_bt" v-if="btShowEdit" style="justify-content: flex-start;">
|
||||||
<div class="mbl_items12">
|
<div class="mbl_items12">
|
||||||
<div
|
<div
|
||||||
class="i12_box1"
|
class="i12_box1"
|
||||||
@@ -219,7 +213,6 @@
|
|||||||
<span style="margin: auto 5px">100%</span>
|
<span style="margin: auto 5px">100%</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 条件渲染 e -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="file_operation">
|
<div class="file_operation">
|
||||||
<div class="fobox">
|
<div class="fobox">
|
||||||
@@ -230,11 +223,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="bg_body_bt">
|
<div class="bg_body_bt" v-if="btShow">
|
||||||
<div class="bg_body_bttext">备注</div>
|
<div class="bg_body_bttext">备注</div>
|
||||||
<div class="bg_body_input">
|
<div class="bg_body_input">
|
||||||
<a-textarea style="width: 334px;height: 88px;" v-model:value="formData.remarks" showCount :maxlength="200" />
|
<a-textarea placeholder="请输入备注(限200个字以内)" style="width: 334px;height: 88px;" v-model:value="formData.remarks" showCount :maxlength="200" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg_footer">
|
<div class="bg_footer">
|
||||||
@@ -243,7 +236,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-button
|
<a-button
|
||||||
class="btn btn6"
|
class="btn btn6"
|
||||||
@click="reportUpload"
|
@click="formData.id&&btShow?showUpload():reportUpload()"
|
||||||
>
|
>
|
||||||
确定
|
确定
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -253,7 +246,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<!-- 修改测评名称 -->
|
<!-- 修改测评名称 -->
|
||||||
<a-modal
|
<!-- <a-modal
|
||||||
v-model:visible="bg_edit"
|
v-model:visible="bg_edit"
|
||||||
:footer="null"
|
:footer="null"
|
||||||
closable="false"
|
closable="false"
|
||||||
@@ -274,7 +267,7 @@
|
|||||||
<NameInput
|
<NameInput
|
||||||
ref="nameRef"
|
ref="nameRef"
|
||||||
placeholder="请输入测评标题(限60个字以内)"
|
placeholder="请输入测评标题(限60个字以内)"
|
||||||
v-model:value="formData.assessmentName"
|
v-model:value="formData.evaluationName"
|
||||||
v-model:validated="formData.validated"
|
v-model:validated="formData.validated"
|
||||||
:id="formData.id"
|
:id="formData.id"
|
||||||
:maxlength="60"
|
:maxlength="60"
|
||||||
@@ -296,7 +289,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal> -->
|
||||||
<!-- 权限 -->
|
<!-- 权限 -->
|
||||||
<a-modal
|
<a-modal
|
||||||
v-model:visible="bg_setting"
|
v-model:visible="bg_setting"
|
||||||
@@ -352,7 +345,7 @@
|
|||||||
>
|
>
|
||||||
<template #action="{ record, column }">
|
<template #action="{ record, column }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button type="link" @click="textEnable(record)" :disabled="record.status==1">
|
<a-button type="link" @click="textEnableAdd(record)" :disabled="record.status==1">
|
||||||
<span :class="{text_color:record.status==1?'text_color':''}">启用</span>
|
<span :class="{text_color:record.status==1?'text_color':''}">启用</span>
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button type="link" @click="textDisabled(record)" :disabled="record.status==2">
|
<a-button type="link" @click="textDisabled(record)" :disabled="record.status==2">
|
||||||
@@ -414,7 +407,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<!-- 修改备注 -->
|
<!-- 修改备注 -->
|
||||||
<a-modal
|
<!-- <a-modal
|
||||||
v-model:visible="bg_remarks"
|
v-model:visible="bg_remarks"
|
||||||
:footer="null"
|
:footer="null"
|
||||||
closable="false"
|
closable="false"
|
||||||
@@ -449,7 +442,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal> -->
|
||||||
<!-- 添加权限设置 -->
|
<!-- 添加权限设置 -->
|
||||||
<a-modal
|
<a-modal
|
||||||
v-model:visible="bg_addsetting"
|
v-model:visible="bg_addsetting"
|
||||||
@@ -476,7 +469,7 @@
|
|||||||
>
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="headers_item btn">
|
<div class="headers_item btn" @click="searchSave">
|
||||||
<div class="headers_item_btn btn1">
|
<div class="headers_item_btn btn1">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">搜索</div>
|
<div class="btnText">搜索</div>
|
||||||
@@ -495,37 +488,11 @@
|
|||||||
:scroll="{ x: 'max-content' }"
|
:scroll="{ x: 'max-content' }"
|
||||||
:pagination="paginationAdd"
|
:pagination="paginationAdd"
|
||||||
>
|
>
|
||||||
<template #allocation="{ record, column }">
|
|
||||||
<a-space>
|
|
||||||
<a-checkbox-group v-model:value="record.checkclick">
|
|
||||||
<a-row>
|
|
||||||
<a-col :span="5">
|
|
||||||
<a-checkbox value="0">查看</a-checkbox>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="7">
|
|
||||||
<a-checkbox value="1">编辑备注</a-checkbox>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="5">
|
|
||||||
<a-checkbox value="2">上传</a-checkbox>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="5">
|
|
||||||
<a-checkbox value="3">清空</a-checkbox>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="7" style="margin-left: 59px;">
|
|
||||||
<a-checkbox value="4">编辑测评</a-checkbox>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="5">
|
|
||||||
<a-checkbox value="5">下载</a-checkbox>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="5">
|
|
||||||
<a-checkbox value="6">删除</a-checkbox>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-checkbox-group>
|
|
||||||
</a-space>
|
|
||||||
</template>
|
|
||||||
<template #addAuthority="{ record, column }">
|
<template #addAuthority="{ record, column }">
|
||||||
<a-space>
|
<a-space>
|
||||||
|
<a-button type="link" @click="powerSetting(record)">
|
||||||
|
<span>权限配置</span>
|
||||||
|
</a-button>
|
||||||
<a-button type="link" @click="textEnableAdd(record)">
|
<a-button type="link" @click="textEnableAdd(record)">
|
||||||
<span>启用</span>
|
<span>启用</span>
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -552,16 +519,74 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
<!-- 修改权限设置 -->
|
||||||
|
<a-modal
|
||||||
|
v-model:visible="bg_power"
|
||||||
|
:footer="null"
|
||||||
|
closable="false"
|
||||||
|
style="margin-top: 400px"
|
||||||
|
@cancel="of_power"
|
||||||
|
>
|
||||||
|
<div class="selectonlineface" style="width: 524px;" :style="{ display: bg_power ? 'block' : 'none' }">
|
||||||
|
<div class="bg_headers"></div>
|
||||||
|
<div class="bg_main">
|
||||||
|
<div class="bg_main_header">
|
||||||
|
<div>权限配置</div>
|
||||||
|
<div class="bg_main_header_close" @click="of_power"></div>
|
||||||
|
</div>
|
||||||
|
<div class="bg_body">
|
||||||
|
<div class="bg_body_bt" style="align-items: flex-start;" v-if="btShow">
|
||||||
|
<a-checkbox-group v-model:value="checkclick">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="8" style="margin-left:120px">
|
||||||
|
<a-checkbox value="1">查看</a-checkbox>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-checkbox value="2">上传</a-checkbox>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8" style="margin-left:120px">
|
||||||
|
<a-checkbox value="3">清空</a-checkbox>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-checkbox value="4">编辑</a-checkbox>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8" style="margin-left:120px">
|
||||||
|
<a-checkbox value="5">下载</a-checkbox>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-checkbox value="6">删除</a-checkbox>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-checkbox-group>
|
||||||
|
</div>
|
||||||
|
<div class="bg_footer" style="margin-left:106px">
|
||||||
|
<div class="btn btn6" @click="of_power">
|
||||||
|
<div class="btnText">取消</div>
|
||||||
|
</div>
|
||||||
|
<a-button
|
||||||
|
class="btn btn6"
|
||||||
|
@click="powerTrue"
|
||||||
|
>
|
||||||
|
确定
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, ref, watch,computed } from "vue";
|
import { reactive, toRefs, ref, watch,computed,onMounted } from "vue";
|
||||||
import DropDown from "@/components/common/DropDown";
|
import DropDown from "@/components/common/DropDown";
|
||||||
import {getCookieForName} from "@/api/method";
|
import {getCookieForName} from "@/api/method";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import dialog from "@/utils/dialog";
|
import dialog from "@/utils/dialog";
|
||||||
import NameInput from "@/components/project/NameInput";
|
import NameInput from "@/components/project/NameInput";
|
||||||
|
import { list,importList,save,uploadImage,downloadAll,adminList,saveEvaluationDetail,updateStatus } from "@/api/evaluation";
|
||||||
|
import { useStore } from "vuex";
|
||||||
|
import { message } from "ant-design-vue";
|
||||||
export default {
|
export default {
|
||||||
name: 'evaluationUpload',
|
name: 'evaluationUpload',
|
||||||
components:{
|
components:{
|
||||||
@@ -569,13 +594,17 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
NameInput,
|
NameInput,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const store = useStore();
|
||||||
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
serchName: '',
|
||||||
|
bg_power: false,
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
tableLoadingAdd: false,
|
tableLoadingAdd: false,
|
||||||
tableLoadingAut: false,
|
tableLoadingAut: false,
|
||||||
total: 40,
|
total: 40,
|
||||||
totalAdd: 40,
|
totalAdd: 0,
|
||||||
params: {
|
params: {
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -584,16 +613,16 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
},
|
},
|
||||||
pageSize: 10,
|
tableDataTotal: 0,
|
||||||
tableDataTotal: 40,
|
|
||||||
searchParam:{
|
searchParam:{
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
status: 0,
|
status: 0,
|
||||||
status2: 0,
|
status2: 0,
|
||||||
},
|
},
|
||||||
|
errorMessage: '',
|
||||||
formData: {
|
formData: {
|
||||||
assessmentName: '',
|
evaluationName: '',
|
||||||
validated: 0,
|
validated: 0,
|
||||||
id: '',
|
id: '',
|
||||||
imageUrl: '',
|
imageUrl: '',
|
||||||
@@ -601,25 +630,15 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
},
|
},
|
||||||
bg_check: false,
|
bg_check: false,
|
||||||
btShow: true,
|
btShow: true,
|
||||||
|
btShowEdit: true,
|
||||||
bg_edit: false,
|
bg_edit: false,
|
||||||
bg_setting: false,
|
bg_setting: false,
|
||||||
bg_addsetting: false,
|
bg_addsetting: false,
|
||||||
bg_results: false,
|
bg_results: false,
|
||||||
bg_remarks: false,
|
bg_remarks: false,
|
||||||
filesList:[{a:11}],
|
checkclick: [],
|
||||||
tableData:[{
|
filesList:[],
|
||||||
id: 1,
|
tableData:[],
|
||||||
evaluationName:'111',
|
|
||||||
reportSum: '22',
|
|
||||||
uploadTime: '2020-01-01',
|
|
||||||
remarks: '我是第一个'
|
|
||||||
},{
|
|
||||||
id: 2,
|
|
||||||
evaluationName:'222',
|
|
||||||
reportSum: '22',
|
|
||||||
uploadTime: '2020-01-01',
|
|
||||||
remarks: '我是第二个'
|
|
||||||
}],
|
|
||||||
tableData1:[
|
tableData1:[
|
||||||
{
|
{
|
||||||
name: '111',
|
name: '111',
|
||||||
@@ -638,24 +657,7 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
authority: '删除,添加',
|
authority: '删除,添加',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
tableDataAdd:[
|
tableDataAdd:[]
|
||||||
{
|
|
||||||
id:1,
|
|
||||||
name:'1111',
|
|
||||||
jobId:1111,
|
|
||||||
job:'京东方',
|
|
||||||
addTime:'2021-02-02',
|
|
||||||
checkclick: ['1']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id:2,
|
|
||||||
name:'2222',
|
|
||||||
jobId:2222,
|
|
||||||
job:'京东方',
|
|
||||||
addTime:'2021-02-02',
|
|
||||||
checkclick: ['0','5']
|
|
||||||
},
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
// const searchStatusVal = ref([
|
// const searchStatusVal = ref([
|
||||||
// { value: 0, label: "全部" },
|
// { value: 0, label: "全部" },
|
||||||
@@ -663,7 +665,34 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
// { value: 2, label: "更新待发布" },
|
// { value: 2, label: "更新待发布" },
|
||||||
// { value: 3, label: "已发布" },
|
// { value: 3, label: "已发布" },
|
||||||
// ]);
|
// ]);
|
||||||
|
onMounted(()=>{
|
||||||
|
state.tableLoading = true
|
||||||
|
listData()
|
||||||
|
})
|
||||||
|
//搜索
|
||||||
|
const serchList = () => {
|
||||||
|
state.tableLoading = true
|
||||||
|
state.serchName = state.searchParam.createName
|
||||||
|
state.searchParam.pageNo = 1
|
||||||
|
listData()
|
||||||
|
}
|
||||||
|
const serchListNo = () => {
|
||||||
|
state.searchParam.createName = ''
|
||||||
|
state.searchParam.pageNo = 1
|
||||||
|
serchList()
|
||||||
|
}
|
||||||
|
const listData = async () => {
|
||||||
|
await list({
|
||||||
|
evaluationName: state.serchName,
|
||||||
|
pageNo: state.searchParam.pageNo,
|
||||||
|
pageSize: state.searchParam.pageSize
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res,'resdata')
|
||||||
|
state.tableData = res.data.records
|
||||||
|
state.tableDataTotal = res.data.total
|
||||||
|
state.tableLoading = false
|
||||||
|
});
|
||||||
|
}
|
||||||
//分配权限
|
//分配权限
|
||||||
const searchStatusVal2 = ref([
|
const searchStatusVal2 = ref([
|
||||||
{ value: 0, label: "全部" },
|
{ value: 0, label: "全部" },
|
||||||
@@ -712,10 +741,18 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "备注",
|
||||||
|
dataIndex: "remarks",
|
||||||
|
key: "remarks",
|
||||||
|
className: "h",
|
||||||
|
ellipsis: true,
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "报告总量",
|
title: "报告总量",
|
||||||
dataIndex: "reportSum",
|
dataIndex: "reportReleaseNums",
|
||||||
key: "reportSum",
|
key: "reportReleaseNums",
|
||||||
className: "h",
|
className: "h",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
@@ -728,14 +765,6 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "备注",
|
|
||||||
dataIndex: "remarks",
|
|
||||||
key: "remarks",
|
|
||||||
className: "h",
|
|
||||||
ellipsis: true,
|
|
||||||
width: 100,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: "20%",
|
width: "20%",
|
||||||
@@ -813,24 +842,24 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
const columnsAdd = ref([
|
const columnsAdd = ref([
|
||||||
{
|
{
|
||||||
title: "姓名",
|
title: "姓名",
|
||||||
dataIndex: "name",
|
dataIndex: "realName",
|
||||||
key: "name",
|
key: "realName",
|
||||||
className: "h",
|
className: "h",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "工号",
|
title: "工号",
|
||||||
dataIndex: "jobId",
|
dataIndex: "departId",
|
||||||
key: "jobId",
|
key: "departId",
|
||||||
className: "h",
|
className: "h",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "组织名称",
|
title: "组织部门",
|
||||||
dataIndex: "job",
|
dataIndex: "departName",
|
||||||
key: "job",
|
key: "departName",
|
||||||
className: "h",
|
className: "h",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
@@ -843,15 +872,6 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "配置权限",
|
|
||||||
dataIndex: "checkclick",
|
|
||||||
key: "checkclick",
|
|
||||||
className: "h",
|
|
||||||
ellipsis: true,
|
|
||||||
width: 300,
|
|
||||||
slots: { customRender: "allocation" },
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: "20%",
|
width: "20%",
|
||||||
@@ -861,12 +881,14 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
slots: { customRender: "addAuthority" },
|
slots: { customRender: "addAuthority" },
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
const textEnable = (record) => {
|
// const textEnable = (record) => {
|
||||||
record.status = 1
|
// record.status = 1
|
||||||
console.log(record,'aaaaa')
|
// console.log(record,'aaaaa')
|
||||||
}
|
// }
|
||||||
const textDisabled = (record) => {
|
const textDisabled = async (record) => {
|
||||||
record.status = 2
|
await updateStatus({status:0}).then((res)=>{
|
||||||
|
console.log(res,'res')
|
||||||
|
})
|
||||||
console.log(record,'aaaa')
|
console.log(record,'aaaa')
|
||||||
}
|
}
|
||||||
const textDelete = (record) => {
|
const textDelete = (record) => {
|
||||||
@@ -880,12 +902,19 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
const bgcheck = (record) =>{
|
const bgcheck = (record) =>{
|
||||||
router.push({
|
router.push({
|
||||||
path:'/evadown',
|
path:'/evadown',
|
||||||
query:{id:record.name}
|
query:{id:record.name,name:record.evaluationName}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
watch(() => state.searchParam.pageSize, () => {
|
||||||
|
state.tableLoading = true
|
||||||
|
state.searchParam.pageNo = 1
|
||||||
|
listData()
|
||||||
|
})
|
||||||
const changePagination = (page,pageSize) => {
|
const changePagination = (page,pageSize) => {
|
||||||
|
state.tableLoading = true
|
||||||
state.searchParam.pageNo = page;
|
state.searchParam.pageNo = page;
|
||||||
state.pageSize = pageSize;
|
state.searchParam.pageSize = pageSize;
|
||||||
|
listData()
|
||||||
};
|
};
|
||||||
//报告上传
|
//报告上传
|
||||||
const bgupload = () => {
|
const bgupload = () => {
|
||||||
@@ -896,9 +925,14 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
state.bg_check = true;
|
state.bg_check = true;
|
||||||
state.btShow = false
|
state.btShow = false
|
||||||
}
|
}
|
||||||
|
const downloadAll = async (record) => {
|
||||||
|
window.open(`${process.env.VUE_APP_BASE_API}/activityApi/evaluation/detaildownload?id=${record.id}`);
|
||||||
|
}
|
||||||
const of_exit = () => {
|
const of_exit = () => {
|
||||||
state.bg_check = false;
|
state.bg_check = false;
|
||||||
|
state.errorMessage = ''
|
||||||
state.btShow = true
|
state.btShow = true
|
||||||
|
state.btShowEdit = true
|
||||||
}
|
}
|
||||||
// 上传结果
|
// 上传结果
|
||||||
const of_results = () => {
|
const of_results = () => {
|
||||||
@@ -910,10 +944,28 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
const tan = () => {
|
const tan = () => {
|
||||||
console.log('aaa')
|
console.log('aaa')
|
||||||
}
|
}
|
||||||
const reportUpload = () => {
|
const reportUpload = async () => {
|
||||||
state.bg_check = false;
|
state.tableLoading = true
|
||||||
state.btShow = true
|
|
||||||
state.bg_results = true
|
state.bg_results = true
|
||||||
|
await save({
|
||||||
|
creatId:userInfo.value.userId,
|
||||||
|
kid:userInfo.value.userId,
|
||||||
|
creatName:userInfo.value.realName,
|
||||||
|
prefix:'',
|
||||||
|
remarks:state.formData.remarks,
|
||||||
|
evaluationName:state.formData.evaluationName,
|
||||||
|
}).then((res)=>{
|
||||||
|
console.log(res.data,'data')
|
||||||
|
})
|
||||||
|
// await saveEvaluationDetail(JSON.stringify(daorures)).then((res)=>{
|
||||||
|
// console.log(res.data,'json')
|
||||||
|
// })
|
||||||
|
of_exit()
|
||||||
|
listData()
|
||||||
|
}
|
||||||
|
const showUpload = () => {
|
||||||
|
console.log('aaaa')
|
||||||
|
of_exit()
|
||||||
}
|
}
|
||||||
//上传图片
|
//上传图片
|
||||||
const headers = { token: getCookieForName("token") };
|
const headers = { token: getCookieForName("token") };
|
||||||
@@ -932,17 +984,62 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
message.error("图片大小超过2MB!");
|
message.error("图片大小超过2MB!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// const formDatas = new FormData();
|
const formDatas = new FormData();
|
||||||
// formDatas.append("file", file);
|
console.log(formDatas.append("file", file),'formDatas')
|
||||||
// fileUp(formDatas).then((res) => {
|
formDatas.append("file", file);
|
||||||
// if (res.data.code === 200) {
|
console.log(formDatas, 'aaaa')
|
||||||
// console.log(res.data.data, 45);
|
uploadImage(formDatas).then((res) => {
|
||||||
// imageUrl.value = process.env.VUE_APP_FILE_PATH + res.data.data;
|
if (res.data.code === 200) {
|
||||||
// formData.value.liveCover = process.env.VUE_APP_FILE_PATH + res.data.data;
|
console.log(res.data.data, 45);
|
||||||
// }
|
state.formData.imageUrl = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||||
// });
|
formData.value.liveCover = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||||
// return false;
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
|
const beforeUpload3 = async (file) => {
|
||||||
|
const pattern = /^([0-9\u4e00-\u9fa5\a-z\A-Z]+-){2}[0-9\u4e00-\u9fa5\a-z\A-Z]+\.\w*$/;
|
||||||
|
console.log(file, 'aaaa')
|
||||||
|
if (!pattern.test(file.name)) {
|
||||||
|
message.error('上传文件名称格式不对')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const isJpgOrPng =
|
||||||
|
file.type === "application/x-zip-compressed" ||
|
||||||
|
file.type === "application/pdf"
|
||||||
|
console.log(isJpgOrPng,'false')
|
||||||
|
if (!isJpgOrPng) {
|
||||||
|
message.error("仅支持zip、pdf格式!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const files = file.name.split('.')[0]
|
||||||
|
const pid = files.split('-')[2]
|
||||||
|
const uploadName = files.split('-')[1]
|
||||||
|
const formDatas = new FormData();
|
||||||
|
formDatas.append("file", file);
|
||||||
|
await importList({
|
||||||
|
file: formDatas,
|
||||||
|
pid,
|
||||||
|
uploadName,
|
||||||
|
}).then((res)=>{
|
||||||
|
console.log(res,'res')
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const handleChange = (info) => {
|
||||||
|
console.log(info,'aaa')
|
||||||
|
let resFileList = [...info.fileList];
|
||||||
|
|
||||||
|
resFileList = resFileList.slice(-2);
|
||||||
|
|
||||||
|
resFileList = resFileList.map(file => {
|
||||||
|
if (file.response) {
|
||||||
|
file.url = file.response.url;
|
||||||
|
}
|
||||||
|
return file;
|
||||||
|
});
|
||||||
|
state.filesList = resFileList;
|
||||||
|
}
|
||||||
const deleteItem = () => {
|
const deleteItem = () => {
|
||||||
dialog({
|
dialog({
|
||||||
content: '请您确认是否要删除测评?',
|
content: '请您确认是否要删除测评?',
|
||||||
@@ -960,16 +1057,24 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 备注
|
// 备注
|
||||||
const openRemarks = (record) => {
|
// const openRemarks = (record) => {
|
||||||
state.bg_remarks = true
|
// state.bg_remarks = true
|
||||||
state.formData.remarks = record.remarks
|
// state.formData.remarks = record.remarks
|
||||||
}
|
// }
|
||||||
const of_remarks = () => {
|
// const of_remarks = () => {
|
||||||
state.bg_remarks = false
|
// state.bg_remarks = false
|
||||||
}
|
// }
|
||||||
const remarksUpdata = () => {
|
// const remarksUpdata = () => {
|
||||||
state.tableData[0].remarks = state.formData.remarks
|
// state.tableData[0].remarks = state.formData.remarks
|
||||||
state.bg_remarks = false
|
// state.bg_remarks = false
|
||||||
|
// }
|
||||||
|
// 编辑
|
||||||
|
const openEdit = (record) => {
|
||||||
|
console.log({...record},'record')
|
||||||
|
state.bg_check = true
|
||||||
|
state.btShow = true
|
||||||
|
state.btShowEdit = false
|
||||||
|
state.formData = {...record}
|
||||||
}
|
}
|
||||||
// 权限
|
// 权限
|
||||||
const authorityItem = () => {
|
const authorityItem = () => {
|
||||||
@@ -982,17 +1087,17 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
state.bg_setting = false
|
state.bg_setting = false
|
||||||
}
|
}
|
||||||
// 测评
|
// 测评
|
||||||
const editName = (record) => {
|
// const editName = (record) => {
|
||||||
state.bg_edit = true
|
// state.bg_edit = true
|
||||||
console.log(record,'aaa')
|
// console.log(record,'aaa')
|
||||||
state.formData.assessmentName = record.evaluationName
|
// state.formData.evaluationName = record.evaluationName
|
||||||
}
|
// }
|
||||||
const of_edit = () => {
|
// const of_edit = () => {
|
||||||
state.bg_edit = false
|
// state.bg_edit = false
|
||||||
}
|
// }
|
||||||
const editUpdata = () => {
|
// const editUpdata = () => {
|
||||||
state.bg_edit = false
|
// state.bg_edit = false
|
||||||
}
|
// }
|
||||||
//添加权限
|
//添加权限
|
||||||
const addAuths = () => {
|
const addAuths = () => {
|
||||||
state.bg_addsetting = true
|
state.bg_addsetting = true
|
||||||
@@ -1001,13 +1106,32 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
const of_addsetting = () => {
|
const of_addsetting = () => {
|
||||||
state.bg_addsetting = false
|
state.bg_addsetting = false
|
||||||
}
|
}
|
||||||
|
//搜索权限
|
||||||
|
const searchSave = async () => {
|
||||||
|
state.tableLoadingAdd = true
|
||||||
|
await adminList({realName:state.searchParam.createName}).then((res)=>{
|
||||||
|
state.tableDataAdd = res.data
|
||||||
|
state.tableLoadingAdd = false
|
||||||
|
console.log(res,'res')
|
||||||
|
})
|
||||||
|
}
|
||||||
const addSettingUp = () => {
|
const addSettingUp = () => {
|
||||||
state.bg_addsetting = false
|
state.bg_addsetting = false
|
||||||
console.log(state.formData,'aaa')
|
console.log(state.formData,'aaa')
|
||||||
}
|
}
|
||||||
const textEnableAdd = (record) => {
|
const powerSetting = async (record) => {
|
||||||
|
state.bg_power = true
|
||||||
|
state.checkclick = record.checkclick
|
||||||
|
|
||||||
|
}
|
||||||
|
const of_power = () => {
|
||||||
|
state.bg_power = false
|
||||||
|
}
|
||||||
|
const textEnableAdd = async (record) => {
|
||||||
console.log(record,'record')
|
console.log(record,'record')
|
||||||
record.checkbox = ['1','5','6','3']
|
await updateStatus({status:0}).then((res)=>{
|
||||||
|
console.log(res,'res')
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const textDeleteAdd = (record,index) => {
|
const textDeleteAdd = (record,index) => {
|
||||||
dialog({
|
dialog({
|
||||||
@@ -1020,37 +1144,49 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
|
userInfo,
|
||||||
// searchStatusVal,
|
// searchStatusVal,
|
||||||
|
listData,
|
||||||
addAuths,
|
addAuths,
|
||||||
of_addsetting,
|
of_addsetting,
|
||||||
|
searchSave,
|
||||||
addSettingUp,
|
addSettingUp,
|
||||||
textEnableAdd,
|
textEnableAdd,
|
||||||
|
powerSetting,
|
||||||
|
of_power,
|
||||||
textDeleteAdd,
|
textDeleteAdd,
|
||||||
searchStatusVal2,
|
searchStatusVal2,
|
||||||
|
serchList,
|
||||||
|
serchListNo,
|
||||||
columns,
|
columns,
|
||||||
columnsAdd,
|
columnsAdd,
|
||||||
columns2,
|
columns2,
|
||||||
bgupload,
|
bgupload,
|
||||||
of_exit,
|
of_exit,
|
||||||
reportUpload,
|
reportUpload,
|
||||||
|
showUpload,
|
||||||
of_results,
|
of_results,
|
||||||
resultsUp,
|
resultsUp,
|
||||||
tan,
|
tan,
|
||||||
of_setting,
|
of_setting,
|
||||||
settingUp,
|
settingUp,
|
||||||
of_edit,
|
// of_edit,
|
||||||
editUpdata,
|
// editUpdata,
|
||||||
// createft,
|
// createft,
|
||||||
bgupload1,
|
bgupload1,
|
||||||
|
downloadAll,
|
||||||
headers,
|
headers,
|
||||||
beforeUpload,
|
beforeUpload,
|
||||||
|
beforeUpload3,
|
||||||
|
handleChange,
|
||||||
bgcheck,
|
bgcheck,
|
||||||
deleteItem,
|
deleteItem,
|
||||||
emptyItem,
|
emptyItem,
|
||||||
editName,
|
// editName,
|
||||||
openRemarks,
|
// openRemarks,
|
||||||
of_remarks,
|
// of_remarks,
|
||||||
remarksUpdata,
|
// remarksUpdata,
|
||||||
|
openEdit,
|
||||||
authorityItem,
|
authorityItem,
|
||||||
changePagination,
|
changePagination,
|
||||||
changePaginations,
|
changePaginations,
|
||||||
@@ -1059,7 +1195,7 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
paginationAdd,
|
paginationAdd,
|
||||||
textDisabled,
|
textDisabled,
|
||||||
textDelete,
|
textDelete,
|
||||||
textEnable,
|
// textEnable,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1404,6 +1540,12 @@ import NameInput from "@/components/project/NameInput";
|
|||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.error-message{
|
||||||
|
color: red;
|
||||||
|
font-size: 11px;
|
||||||
|
margin-top: 2px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.bg_footer {
|
.bg_footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user