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