mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 02:46:45 +08:00
测评上传
This commit is contained in:
@@ -28,3 +28,7 @@ export const getPage = (obj) => http.post(`${ACTIVITYAPI}/evaluation/detail/getP
|
||||
export const deleteById = (obj) => http.post(`${ACTIVITYAPI}/evaluation/detail/deleteById`,obj)
|
||||
//测评清空
|
||||
export const clear = (obj) => http.post(`${ACTIVITYAPI}/evaluation/clear`,obj)
|
||||
//保存启用的人员信息
|
||||
export const savePermission = (obj) => http.post(`${ACTIVITYAPI}/permission/savePermission`,obj)
|
||||
//权限列表
|
||||
export const saveLists = (obj) => http.post(`${ACTIVITYAPI}/permission/list`,obj)
|
||||
|
||||
@@ -67,10 +67,13 @@ import dialog from "@/utils/dialog";
|
||||
import { getPage,deleteById } from "@/api/evaluation";
|
||||
import { useRoute } from "vue-router";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useStore } from "vuex";
|
||||
export default {
|
||||
name: "evadown",
|
||||
components: {},
|
||||
setup() {
|
||||
const store = useStore();
|
||||
const userInfo = computed(()=>store.state.userInfo)
|
||||
const route = useRoute();
|
||||
const state = reactive({
|
||||
searchName: '',
|
||||
@@ -108,8 +111,8 @@ import { message } from "ant-design-vue";
|
||||
},
|
||||
{
|
||||
title: "上传人",
|
||||
dataIndex: "uploader",
|
||||
key: "uploader",
|
||||
dataIndex: "uploadName",
|
||||
key: "uploadName",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
@@ -148,8 +151,8 @@ import { message } from "ant-design-vue";
|
||||
pid:route.query.id,
|
||||
|
||||
}).then((res) => {
|
||||
console.log(res,'data')
|
||||
state.tableData = res.data.records
|
||||
state.tableData = res.data.records,
|
||||
console.log(state.tableData,'data')
|
||||
state.total = res.data.total
|
||||
})
|
||||
|
||||
@@ -175,6 +178,7 @@ import { message } from "ant-design-vue";
|
||||
deleteItem,
|
||||
pagination,
|
||||
listData,
|
||||
userInfo,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
</div>
|
||||
<div class="headers_item">
|
||||
<a-input
|
||||
v-model:value="searchParam.createName"
|
||||
v-model:value="searchParam.createNames"
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="工号/姓名"
|
||||
allowClear
|
||||
@@ -488,12 +488,12 @@
|
||||
>
|
||||
</a-input>
|
||||
</div>
|
||||
<div class="headers_item btn" @click="searchSave">
|
||||
<div class="headers_item_btn btn1">
|
||||
<div class="headers_item btn">
|
||||
<div class="headers_item_btn btn1" @click="searchSave">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="headers_item_btn btn2">
|
||||
<div class="headers_item_btn btn2" @click="removeSave">
|
||||
<div class="search"></div>
|
||||
<div class="btnText">重置</div>
|
||||
</div>
|
||||
@@ -512,7 +512,7 @@
|
||||
<a-button type="link" @click="powerSetting(record)">
|
||||
<span>权限配置</span>
|
||||
</a-button>
|
||||
<a-button type="link" @click="textEnableAdd(record)">
|
||||
<a-button type="link" :disabled="record.status==0" @click="textEnableAdd(record)">
|
||||
<span>启用</span>
|
||||
</a-button>
|
||||
<a-button type="link" @click="textDeleteAdd(record,index)">
|
||||
@@ -614,7 +614,9 @@ import {
|
||||
saveEvaluationDetail,
|
||||
updateStatus,
|
||||
deleteList,
|
||||
clear
|
||||
clear,
|
||||
savePermission,
|
||||
saveLists
|
||||
} from "@/api/evaluation";
|
||||
import { useStore } from "vuex";
|
||||
import { message } from "ant-design-vue";
|
||||
@@ -629,6 +631,7 @@ import { message } from "ant-design-vue";
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
saveList: [],
|
||||
idValue: '',
|
||||
valueAll: [],
|
||||
uploadStatus: true,
|
||||
@@ -639,7 +642,7 @@ import { message } from "ant-design-vue";
|
||||
tableLoading: false,
|
||||
tableLoadingAdd: false,
|
||||
tableLoadingAut: false,
|
||||
total: 40,
|
||||
total: 0,
|
||||
totalAdd: 0,
|
||||
params: {
|
||||
pageNo: 1,
|
||||
@@ -654,7 +657,7 @@ import { message } from "ant-design-vue";
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
status: 0,
|
||||
status2: 0,
|
||||
status2: null,
|
||||
},
|
||||
errorMessage: '',
|
||||
formData: {
|
||||
@@ -675,24 +678,7 @@ import { message } from "ant-design-vue";
|
||||
checkclick: [],
|
||||
filesList:[],
|
||||
tableData:[],
|
||||
tableData1:[
|
||||
{
|
||||
name: '111',
|
||||
jobId: '111',
|
||||
organDepart: 'aaaaa',
|
||||
status: 1,
|
||||
addTime: '2023-02-5',
|
||||
authority: '删除',
|
||||
},
|
||||
{
|
||||
name: '111',
|
||||
jobId: '111',
|
||||
organDepart: 'aaaaa',
|
||||
status: 2,
|
||||
addTime: '2023-02-5',
|
||||
authority: '删除,添加',
|
||||
},
|
||||
],
|
||||
tableData1:[],
|
||||
tableDataAdd:[]
|
||||
})
|
||||
// const searchStatusVal = ref([
|
||||
@@ -731,9 +717,9 @@ import { message } from "ant-design-vue";
|
||||
}
|
||||
//分配权限
|
||||
const searchStatusVal2 = ref([
|
||||
{ value: 0, label: "全部" },
|
||||
{ value: 1, label: "启用" },
|
||||
{ value: 2, label: "禁用" },
|
||||
{ value: null, label: "全部" },
|
||||
{ value: 0, label: "启用" },
|
||||
{ value: 1, label: "禁用" },
|
||||
]);
|
||||
const pagination = computed(() => ({
|
||||
total: state.total,
|
||||
@@ -961,7 +947,7 @@ import { message } from "ant-design-vue";
|
||||
const bgupload1 = (record) => {
|
||||
console.log(record,'record')
|
||||
state.uploadId = record.id
|
||||
state.uploadName = record.evaluationName
|
||||
state.uploadName = userInfo.value.realName
|
||||
state.formData = {...record}
|
||||
state.uploadStatus = false
|
||||
state.bg_check = true;
|
||||
@@ -1072,15 +1058,16 @@ import { message } from "ant-design-vue";
|
||||
formDatas.append("file", file);
|
||||
if(state.uploadId){
|
||||
formDatas.append("pid", state.uploadId);
|
||||
formDatas.append("uploadName", state.uploadName);
|
||||
formDatas.append("uploadName", userInfo.value.realName);
|
||||
}else{
|
||||
formDatas.append("uploadName", state.formData.evaluationName);
|
||||
formDatas.append("uploadName", userInfo.value.realName);
|
||||
}
|
||||
await importList(formDatas).then((res)=>{
|
||||
console.log(res,'res')
|
||||
if(res.code === 200){
|
||||
state.idValue = res.data.map(item=>item.id)
|
||||
console.log(state.idValue,'idValue')
|
||||
userInfo.value.realName
|
||||
state.valueAll = res.data
|
||||
console.log(state.valueAll,'valueAll')
|
||||
}
|
||||
@@ -1149,8 +1136,20 @@ import { message } from "ant-design-vue";
|
||||
state.formData = {...record}
|
||||
}
|
||||
// 权限
|
||||
const authorityItem = () => {
|
||||
const authorityItem = async (record) => {
|
||||
console.log(record,'record')
|
||||
state.bg_setting = true
|
||||
await saveLists({
|
||||
pid:record.id,
|
||||
nameOrWorkNum:state.searchParam.createNames,
|
||||
status:state.searchParam.status2,
|
||||
}).then((res)=>{
|
||||
console.log(res,'res')
|
||||
if(res.code === 200){
|
||||
state.tableData1 = res.data.records
|
||||
state.total = res.data.total
|
||||
}
|
||||
})
|
||||
}
|
||||
const of_setting = () => {
|
||||
state.bg_setting = false
|
||||
@@ -1177,19 +1176,28 @@ import { message } from "ant-design-vue";
|
||||
}
|
||||
const of_addsetting = () => {
|
||||
state.bg_addsetting = false
|
||||
state.searchParam.createName = ''
|
||||
state.tableDataAdd = []
|
||||
}
|
||||
//搜索权限
|
||||
const searchSave = async () => {
|
||||
state.tableLoadingAdd = true
|
||||
await adminList({realName:state.searchParam.createName}).then((res)=>{
|
||||
await adminList({keyword: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 removeSave = () => {
|
||||
state.searchParam.createName = ''
|
||||
state.tableDataAdd = []
|
||||
}
|
||||
//添加权限确定
|
||||
const addSettingUp = async () => {
|
||||
await savePermission({userList:state.saveList}).then((res)=>{
|
||||
console.log(res,'res')
|
||||
})
|
||||
of_addsetting()
|
||||
}
|
||||
const powerSetting = async (record) => {
|
||||
state.bg_power = true
|
||||
@@ -1202,8 +1210,12 @@ import { message } from "ant-design-vue";
|
||||
const textEnableAdd = async (record) => {
|
||||
console.log(record,'record')
|
||||
await updateStatus({status:0}).then((res)=>{
|
||||
console.log(res,'res')
|
||||
state.tableData1.status = 1
|
||||
if(res.code === 200){
|
||||
console.log(res,'res')
|
||||
message.success('启用成功')
|
||||
record.status = 0
|
||||
state.saveList.push(record)
|
||||
}
|
||||
})
|
||||
}
|
||||
const textDeleteAdd = (record,index) => {
|
||||
@@ -1223,6 +1235,7 @@ import { message } from "ant-design-vue";
|
||||
addAuths,
|
||||
of_addsetting,
|
||||
searchSave,
|
||||
removeSave,
|
||||
addSettingUp,
|
||||
textEnableAdd,
|
||||
powerSetting,
|
||||
|
||||
Reference in New Issue
Block a user