mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +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: '测评报告'
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -556,6 +556,9 @@
|
||||
{
|
||||
name: '测评报告'
|
||||
},
|
||||
{
|
||||
name: route.query.name
|
||||
}
|
||||
];
|
||||
}
|
||||
if (n.indexOf("/download") !== -1 || n.indexOf("/download") !== -1) {
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
<script>
|
||||
import { ref,onMounted, reactive,toRefs,computed } from "vue";
|
||||
import dialog from "@/utils/dialog";
|
||||
import { saveAdmin } from "@/api/evaluation";
|
||||
export default {
|
||||
name: "evadown",
|
||||
components: {},
|
||||
@@ -72,7 +73,7 @@ import dialog from "@/utils/dialog";
|
||||
searchName: '',
|
||||
tableData:[
|
||||
{
|
||||
name:',,',
|
||||
name:'111',
|
||||
jobId:'111',
|
||||
evaluationName:'aaaaa',
|
||||
uploader:'eeeee',
|
||||
@@ -156,6 +157,7 @@ import dialog from "@/utils/dialog";
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
console.log('aaa')})
|
||||
return {
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
>
|
||||
</a-input>
|
||||
</div>
|
||||
<div class="headers_item btn">
|
||||
<div class="headers_item btn" @click="serchList">
|
||||
<div class="headers_item_btn btn1">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="headers_item_btn btn2">
|
||||
<div class="headers_item_btn btn2" @click="serchListNo">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
@@ -62,25 +62,21 @@
|
||||
<span class="upload"></span>
|
||||
</a-tooltip>
|
||||
</a-button>
|
||||
<a-button type="link">
|
||||
<a-button type="link" @click="downloadAll(record)">
|
||||
<a-tooltip>
|
||||
<template #title>下载</template>
|
||||
<span class="download"></span>
|
||||
</a-tooltip>
|
||||
</a-button>
|
||||
<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>
|
||||
修改备注
|
||||
编辑
|
||||
</a-button>
|
||||
<a-button type="link" class="btn_item" @click="authorityItem(record)">
|
||||
<span class="authority"></span>
|
||||
权限设置
|
||||
</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)">
|
||||
<span class="delete"></span>
|
||||
删除
|
||||
@@ -100,8 +96,8 @@
|
||||
:showSizeChanger="true"
|
||||
:showQuickJumper="false"
|
||||
:hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
v-model:current="searchParam.pageNo"
|
||||
:pageSize="searchParam.pageSize"
|
||||
:current="searchParam.pageNo"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="changePagination"
|
||||
@@ -122,7 +118,7 @@
|
||||
<div class="bg_main">
|
||||
<div class="bg_main_header">
|
||||
<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>
|
||||
<div class="bg_body">
|
||||
@@ -137,15 +133,11 @@
|
||||
<span>测评标题</span>
|
||||
</div>
|
||||
<div class="bg_body_input">
|
||||
<NameInput
|
||||
ref="nameRef"
|
||||
placeholder="请输入测评标题(限60个字以内)"
|
||||
v-model:value="formData.assessmentName"
|
||||
v-model:validated="formData.validated"
|
||||
:id="formData.id"
|
||||
:maxlength="60"
|
||||
<a-input
|
||||
v-model:value="formData.evaluationName"
|
||||
show-count
|
||||
></NameInput>
|
||||
:maxlength="60"
|
||||
placeholder="请输入测评标题(限60个字以内)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg_body_bt" v-if="btShow">
|
||||
@@ -169,7 +161,7 @@
|
||||
</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_input">
|
||||
<span style="color: #999ba3">
|
||||
@@ -178,7 +170,7 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg_body_bt">
|
||||
<div class="bg_body_bt" v-if="btShowEdit">
|
||||
<div class="bg_body_bttext">
|
||||
<div class="bg_body_btimg">
|
||||
<img
|
||||
@@ -191,17 +183,19 @@
|
||||
<div class="bg_body_input">
|
||||
<a-upload
|
||||
name="file"
|
||||
:show-upload-list="false"
|
||||
:file-list="filesList"
|
||||
:headers="headers"
|
||||
:before-upload="beforeUpload3"
|
||||
>
|
||||
>
|
||||
<!-- action="/activityApi/evaluation/import"
|
||||
@change="handleChange" -->
|
||||
<div class="upload_box">
|
||||
<span>选择文件</span>
|
||||
</div>
|
||||
</a-upload>
|
||||
</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="i12_box1"
|
||||
@@ -219,7 +213,6 @@
|
||||
<span style="margin: auto 5px">100%</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 条件渲染 e -->
|
||||
</div>
|
||||
<div class="file_operation">
|
||||
<div class="fobox">
|
||||
@@ -230,11 +223,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg_body_bt">
|
||||
</div> -->
|
||||
<div class="bg_body_bt" v-if="btShow">
|
||||
<div class="bg_body_bttext">备注</div>
|
||||
<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 class="bg_footer">
|
||||
@@ -243,7 +236,7 @@
|
||||
</div>
|
||||
<a-button
|
||||
class="btn btn6"
|
||||
@click="reportUpload"
|
||||
@click="formData.id&&btShow?showUpload():reportUpload()"
|
||||
>
|
||||
确定
|
||||
</a-button>
|
||||
@@ -253,7 +246,7 @@
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 修改测评名称 -->
|
||||
<a-modal
|
||||
<!-- <a-modal
|
||||
v-model:visible="bg_edit"
|
||||
:footer="null"
|
||||
closable="false"
|
||||
@@ -274,7 +267,7 @@
|
||||
<NameInput
|
||||
ref="nameRef"
|
||||
placeholder="请输入测评标题(限60个字以内)"
|
||||
v-model:value="formData.assessmentName"
|
||||
v-model:value="formData.evaluationName"
|
||||
v-model:validated="formData.validated"
|
||||
:id="formData.id"
|
||||
:maxlength="60"
|
||||
@@ -296,7 +289,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</a-modal> -->
|
||||
<!-- 权限 -->
|
||||
<a-modal
|
||||
v-model:visible="bg_setting"
|
||||
@@ -352,7 +345,7 @@
|
||||
>
|
||||
<template #action="{ record, column }">
|
||||
<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>
|
||||
</a-button>
|
||||
<a-button type="link" @click="textDisabled(record)" :disabled="record.status==2">
|
||||
@@ -414,7 +407,7 @@
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 修改备注 -->
|
||||
<a-modal
|
||||
<!-- <a-modal
|
||||
v-model:visible="bg_remarks"
|
||||
:footer="null"
|
||||
closable="false"
|
||||
@@ -449,7 +442,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</a-modal> -->
|
||||
<!-- 添加权限设置 -->
|
||||
<a-modal
|
||||
v-model:visible="bg_addsetting"
|
||||
@@ -476,7 +469,7 @@
|
||||
>
|
||||
</a-input>
|
||||
</div>
|
||||
<div class="headers_item btn">
|
||||
<div class="headers_item btn" @click="searchSave">
|
||||
<div class="headers_item_btn btn1">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
@@ -495,37 +488,11 @@
|
||||
:scroll="{ x: 'max-content' }"
|
||||
: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 }">
|
||||
<a-space>
|
||||
<a-button type="link" @click="powerSetting(record)">
|
||||
<span>权限配置</span>
|
||||
</a-button>
|
||||
<a-button type="link" @click="textEnableAdd(record)">
|
||||
<span>启用</span>
|
||||
</a-button>
|
||||
@@ -552,16 +519,74 @@
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<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 {getCookieForName} from "@/api/method";
|
||||
import { useRouter } from "vue-router";
|
||||
import dialog from "@/utils/dialog";
|
||||
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 {
|
||||
name: 'evaluationUpload',
|
||||
components:{
|
||||
@@ -569,13 +594,17 @@ import NameInput from "@/components/project/NameInput";
|
||||
NameInput,
|
||||
},
|
||||
setup() {
|
||||
const store = useStore();
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
serchName: '',
|
||||
bg_power: false,
|
||||
tableLoading: false,
|
||||
tableLoadingAdd: false,
|
||||
tableLoadingAut: false,
|
||||
total: 40,
|
||||
totalAdd: 40,
|
||||
totalAdd: 0,
|
||||
params: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
@@ -584,16 +613,16 @@ import NameInput from "@/components/project/NameInput";
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
pageSize: 10,
|
||||
tableDataTotal: 40,
|
||||
tableDataTotal: 0,
|
||||
searchParam:{
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: 0,
|
||||
status2: 0,
|
||||
},
|
||||
errorMessage: '',
|
||||
formData: {
|
||||
assessmentName: '',
|
||||
evaluationName: '',
|
||||
validated: 0,
|
||||
id: '',
|
||||
imageUrl: '',
|
||||
@@ -601,25 +630,15 @@ import NameInput from "@/components/project/NameInput";
|
||||
},
|
||||
bg_check: false,
|
||||
btShow: true,
|
||||
btShowEdit: true,
|
||||
bg_edit: false,
|
||||
bg_setting: false,
|
||||
bg_addsetting: false,
|
||||
bg_results: false,
|
||||
bg_remarks: false,
|
||||
filesList:[{a:11}],
|
||||
tableData:[{
|
||||
id: 1,
|
||||
evaluationName:'111',
|
||||
reportSum: '22',
|
||||
uploadTime: '2020-01-01',
|
||||
remarks: '我是第一个'
|
||||
},{
|
||||
id: 2,
|
||||
evaluationName:'222',
|
||||
reportSum: '22',
|
||||
uploadTime: '2020-01-01',
|
||||
remarks: '我是第二个'
|
||||
}],
|
||||
checkclick: [],
|
||||
filesList:[],
|
||||
tableData:[],
|
||||
tableData1:[
|
||||
{
|
||||
name: '111',
|
||||
@@ -638,24 +657,7 @@ import NameInput from "@/components/project/NameInput";
|
||||
authority: '删除,添加',
|
||||
},
|
||||
],
|
||||
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']
|
||||
},
|
||||
]
|
||||
tableDataAdd:[]
|
||||
})
|
||||
// const searchStatusVal = ref([
|
||||
// { value: 0, label: "全部" },
|
||||
@@ -663,7 +665,34 @@ import NameInput from "@/components/project/NameInput";
|
||||
// { value: 2, 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([
|
||||
{ value: 0, label: "全部" },
|
||||
@@ -712,10 +741,18 @@ import NameInput from "@/components/project/NameInput";
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "备注",
|
||||
dataIndex: "remarks",
|
||||
key: "remarks",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "报告总量",
|
||||
dataIndex: "reportSum",
|
||||
key: "reportSum",
|
||||
dataIndex: "reportReleaseNums",
|
||||
key: "reportReleaseNums",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
@@ -728,14 +765,6 @@ import NameInput from "@/components/project/NameInput";
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "备注",
|
||||
dataIndex: "remarks",
|
||||
key: "remarks",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: "20%",
|
||||
@@ -813,24 +842,24 @@ import NameInput from "@/components/project/NameInput";
|
||||
const columnsAdd = ref([
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
dataIndex: "realName",
|
||||
key: "realName",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "jobId",
|
||||
key: "jobId",
|
||||
dataIndex: "departId",
|
||||
key: "departId",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "组织名称",
|
||||
dataIndex: "job",
|
||||
key: "job",
|
||||
title: "组织部门",
|
||||
dataIndex: "departName",
|
||||
key: "departName",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
@@ -843,15 +872,6 @@ import NameInput from "@/components/project/NameInput";
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "配置权限",
|
||||
dataIndex: "checkclick",
|
||||
key: "checkclick",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 300,
|
||||
slots: { customRender: "allocation" },
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: "20%",
|
||||
@@ -861,12 +881,14 @@ import NameInput from "@/components/project/NameInput";
|
||||
slots: { customRender: "addAuthority" },
|
||||
},
|
||||
])
|
||||
const textEnable = (record) => {
|
||||
record.status = 1
|
||||
console.log(record,'aaaaa')
|
||||
}
|
||||
const textDisabled = (record) => {
|
||||
record.status = 2
|
||||
// const textEnable = (record) => {
|
||||
// record.status = 1
|
||||
// console.log(record,'aaaaa')
|
||||
// }
|
||||
const textDisabled = async (record) => {
|
||||
await updateStatus({status:0}).then((res)=>{
|
||||
console.log(res,'res')
|
||||
})
|
||||
console.log(record,'aaaa')
|
||||
}
|
||||
const textDelete = (record) => {
|
||||
@@ -880,12 +902,19 @@ import NameInput from "@/components/project/NameInput";
|
||||
const bgcheck = (record) =>{
|
||||
router.push({
|
||||
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) => {
|
||||
state.tableLoading = true
|
||||
state.searchParam.pageNo = page;
|
||||
state.pageSize = pageSize;
|
||||
state.searchParam.pageSize = pageSize;
|
||||
listData()
|
||||
};
|
||||
//报告上传
|
||||
const bgupload = () => {
|
||||
@@ -896,9 +925,14 @@ import NameInput from "@/components/project/NameInput";
|
||||
state.bg_check = true;
|
||||
state.btShow = false
|
||||
}
|
||||
const downloadAll = async (record) => {
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/activityApi/evaluation/detaildownload?id=${record.id}`);
|
||||
}
|
||||
const of_exit = () => {
|
||||
state.bg_check = false;
|
||||
state.errorMessage = ''
|
||||
state.btShow = true
|
||||
state.btShowEdit = true
|
||||
}
|
||||
// 上传结果
|
||||
const of_results = () => {
|
||||
@@ -910,10 +944,28 @@ import NameInput from "@/components/project/NameInput";
|
||||
const tan = () => {
|
||||
console.log('aaa')
|
||||
}
|
||||
const reportUpload = () => {
|
||||
state.bg_check = false;
|
||||
state.btShow = true
|
||||
const reportUpload = async () => {
|
||||
state.tableLoading = 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") };
|
||||
@@ -932,17 +984,62 @@ import NameInput from "@/components/project/NameInput";
|
||||
message.error("图片大小超过2MB!");
|
||||
return false;
|
||||
}
|
||||
// const formDatas = new FormData();
|
||||
// formDatas.append("file", file);
|
||||
// fileUp(formDatas).then((res) => {
|
||||
// if (res.data.code === 200) {
|
||||
// console.log(res.data.data, 45);
|
||||
// imageUrl.value = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||
// formData.value.liveCover = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||
// }
|
||||
// });
|
||||
// return false;
|
||||
const formDatas = new FormData();
|
||||
console.log(formDatas.append("file", file),'formDatas')
|
||||
formDatas.append("file", file);
|
||||
console.log(formDatas, 'aaaa')
|
||||
uploadImage(formDatas).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
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;
|
||||
};
|
||||
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 = () => {
|
||||
dialog({
|
||||
content: '请您确认是否要删除测评?',
|
||||
@@ -960,16 +1057,24 @@ import NameInput from "@/components/project/NameInput";
|
||||
})
|
||||
}
|
||||
// 备注
|
||||
const openRemarks = (record) => {
|
||||
state.bg_remarks = true
|
||||
state.formData.remarks = record.remarks
|
||||
}
|
||||
const of_remarks = () => {
|
||||
state.bg_remarks = false
|
||||
}
|
||||
const remarksUpdata = () => {
|
||||
state.tableData[0].remarks = state.formData.remarks
|
||||
state.bg_remarks = false
|
||||
// const openRemarks = (record) => {
|
||||
// state.bg_remarks = true
|
||||
// state.formData.remarks = record.remarks
|
||||
// }
|
||||
// const of_remarks = () => {
|
||||
// state.bg_remarks = false
|
||||
// }
|
||||
// const remarksUpdata = () => {
|
||||
// state.tableData[0].remarks = state.formData.remarks
|
||||
// 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 = () => {
|
||||
@@ -982,17 +1087,17 @@ import NameInput from "@/components/project/NameInput";
|
||||
state.bg_setting = false
|
||||
}
|
||||
// 测评
|
||||
const editName = (record) => {
|
||||
state.bg_edit = true
|
||||
console.log(record,'aaa')
|
||||
state.formData.assessmentName = record.evaluationName
|
||||
}
|
||||
const of_edit = () => {
|
||||
state.bg_edit = false
|
||||
}
|
||||
const editUpdata = () => {
|
||||
state.bg_edit = false
|
||||
}
|
||||
// const editName = (record) => {
|
||||
// state.bg_edit = true
|
||||
// console.log(record,'aaa')
|
||||
// state.formData.evaluationName = record.evaluationName
|
||||
// }
|
||||
// const of_edit = () => {
|
||||
// state.bg_edit = false
|
||||
// }
|
||||
// const editUpdata = () => {
|
||||
// state.bg_edit = false
|
||||
// }
|
||||
//添加权限
|
||||
const addAuths = () => {
|
||||
state.bg_addsetting = true
|
||||
@@ -1001,13 +1106,32 @@ import NameInput from "@/components/project/NameInput";
|
||||
const of_addsetting = () => {
|
||||
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 = () => {
|
||||
state.bg_addsetting = false
|
||||
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')
|
||||
record.checkbox = ['1','5','6','3']
|
||||
await updateStatus({status:0}).then((res)=>{
|
||||
console.log(res,'res')
|
||||
})
|
||||
}
|
||||
const textDeleteAdd = (record,index) => {
|
||||
dialog({
|
||||
@@ -1020,37 +1144,49 @@ import NameInput from "@/components/project/NameInput";
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
userInfo,
|
||||
// searchStatusVal,
|
||||
listData,
|
||||
addAuths,
|
||||
of_addsetting,
|
||||
searchSave,
|
||||
addSettingUp,
|
||||
textEnableAdd,
|
||||
powerSetting,
|
||||
of_power,
|
||||
textDeleteAdd,
|
||||
searchStatusVal2,
|
||||
serchList,
|
||||
serchListNo,
|
||||
columns,
|
||||
columnsAdd,
|
||||
columns2,
|
||||
bgupload,
|
||||
of_exit,
|
||||
reportUpload,
|
||||
showUpload,
|
||||
of_results,
|
||||
resultsUp,
|
||||
tan,
|
||||
of_setting,
|
||||
settingUp,
|
||||
of_edit,
|
||||
editUpdata,
|
||||
// of_edit,
|
||||
// editUpdata,
|
||||
// createft,
|
||||
bgupload1,
|
||||
downloadAll,
|
||||
headers,
|
||||
beforeUpload,
|
||||
beforeUpload3,
|
||||
handleChange,
|
||||
bgcheck,
|
||||
deleteItem,
|
||||
emptyItem,
|
||||
editName,
|
||||
openRemarks,
|
||||
of_remarks,
|
||||
remarksUpdata,
|
||||
// editName,
|
||||
// openRemarks,
|
||||
// of_remarks,
|
||||
// remarksUpdata,
|
||||
openEdit,
|
||||
authorityItem,
|
||||
changePagination,
|
||||
changePaginations,
|
||||
@@ -1059,7 +1195,7 @@ import NameInput from "@/components/project/NameInput";
|
||||
paginationAdd,
|
||||
textDisabled,
|
||||
textDelete,
|
||||
textEnable,
|
||||
// textEnable,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1404,6 +1540,12 @@ import NameInput from "@/components/project/NameInput";
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.error-message{
|
||||
color: red;
|
||||
font-size: 11px;
|
||||
margin-top: 2px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.bg_footer {
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user