mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 02:46:45 +08:00
Merge branch 'zcwy-0306' into dev0223
This commit is contained in:
@@ -32,3 +32,5 @@ 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)
|
||||
//删除配置管理
|
||||
export const deleteId = (obj) => http.post(`${ACTIVITYAPI}/permission/delete`,obj)
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
</a-input>
|
||||
</div>
|
||||
<div class="headers_item btn">
|
||||
<div class="headers_item_btn btn1">
|
||||
<div class="headers_item_btn btn1" @click="searchSaveList">
|
||||
<div class="btnText">搜索</div>
|
||||
</div>
|
||||
<div class="headers_item_btn btn2" @click="addAuths">
|
||||
@@ -359,16 +359,16 @@
|
||||
:columns="columns2"
|
||||
:data-source="tableData1"
|
||||
:loading="tableLoadingAut"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
:scroll="{ x: '1000' }"
|
||||
:pagination="pagination"
|
||||
>
|
||||
<template #action="{ record, column }">
|
||||
<a-space>
|
||||
<a-button type="link" @click="textEnableAdd(record)" :disabled="record.status==1">
|
||||
<span :class="{text_color:record.status==1?'text_color':''}">启用</span>
|
||||
<a-button type="link" @click="textEnableAdd(record)" :disabled="record.status==0">
|
||||
<span :class="{text_color:record.status==0?'text_color':''}">启用</span>
|
||||
</a-button>
|
||||
<a-button type="link" @click="textDisabled(record)" :disabled="record.status==2">
|
||||
<span :class="record.status==2?'text_color':''">禁用</span>
|
||||
<a-button type="link" @click="textDisabled(record)" :disabled="record.status==1">
|
||||
<span :class="record.status==1?'text_color':''">禁用</span>
|
||||
</a-button>
|
||||
<a-button type="link" @click="textDelete(record)">
|
||||
<span class="download">删除</span>
|
||||
@@ -616,7 +616,8 @@ import {
|
||||
deleteList,
|
||||
clear,
|
||||
savePermission,
|
||||
saveLists
|
||||
saveLists,
|
||||
deleteId
|
||||
} from "@/api/evaluation";
|
||||
import { useStore } from "vuex";
|
||||
import { message } from "ant-design-vue";
|
||||
@@ -632,6 +633,7 @@ import { message } from "ant-design-vue";
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
saveList: [],
|
||||
saveListPid: '',
|
||||
idValue: '',
|
||||
valueAll: [],
|
||||
uploadStatus: true,
|
||||
@@ -807,32 +809,35 @@ import { message } from "ant-design-vue";
|
||||
},
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "jobId",
|
||||
key: "jobId",
|
||||
dataIndex: "workNum",
|
||||
key: "workNum",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "组织部门",
|
||||
dataIndex: "organDepart",
|
||||
key: "organDepart",
|
||||
dataIndex: "organizationalDepartment",
|
||||
key: "organizationalDepartment",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
customRender: ({ text }) => {
|
||||
return text ? text : "";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "添加时间",
|
||||
dataIndex: "addTime",
|
||||
key: "addTime",
|
||||
dataIndex: "updateTime",
|
||||
key: "updateTime",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "权限",
|
||||
dataIndex: "authority",
|
||||
key: "authority",
|
||||
dataIndex: "permissionList",
|
||||
key: "permissionList",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
@@ -908,17 +913,24 @@ import { message } from "ant-design-vue";
|
||||
// console.log(record,'aaaaa')
|
||||
// }
|
||||
const textDisabled = async (record) => {
|
||||
await updateStatus({status:0}).then((res)=>{
|
||||
await updateStatus({status:1,id:record.id}).then((res)=>{
|
||||
console.log(res,'res')
|
||||
record.status = 1
|
||||
if(res.code === 200){
|
||||
message.success('禁用成功')
|
||||
saveListItem()
|
||||
}
|
||||
})
|
||||
console.log(record,'aaaa')
|
||||
}
|
||||
const textDelete = (record) => {
|
||||
dialog({
|
||||
content: '是否删除?',
|
||||
ok: () => {
|
||||
console.log('111')
|
||||
deleteId({id:record.id}).then((res)=>{
|
||||
if(res.code === 200){
|
||||
message.success('删除成功')
|
||||
saveListItem()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1135,12 +1147,11 @@ import { message } from "ant-design-vue";
|
||||
state.btShowEdit = false
|
||||
state.formData = {...record}
|
||||
}
|
||||
// 权限
|
||||
const authorityItem = async (record) => {
|
||||
console.log(record,'record')
|
||||
state.bg_setting = true
|
||||
//权限列表
|
||||
const saveListItem = async () => {
|
||||
state.tableLoadingAut = true
|
||||
await saveLists({
|
||||
pid:record.id,
|
||||
pid:state.saveListPid,
|
||||
nameOrWorkNum:state.searchParam.createNames,
|
||||
status:state.searchParam.status2,
|
||||
}).then((res)=>{
|
||||
@@ -1148,9 +1159,17 @@ import { message } from "ant-design-vue";
|
||||
if(res.code === 200){
|
||||
state.tableData1 = res.data.records
|
||||
state.total = res.data.total
|
||||
state.tableLoadingAut = false
|
||||
}
|
||||
})
|
||||
}
|
||||
// 权限
|
||||
const authorityItem = async (record) => {
|
||||
console.log(record,'record')
|
||||
state.saveListPid = record.id
|
||||
state.bg_setting = true
|
||||
saveListItem()
|
||||
}
|
||||
const of_setting = () => {
|
||||
state.bg_setting = false
|
||||
}
|
||||
@@ -1174,6 +1193,10 @@ import { message } from "ant-design-vue";
|
||||
state.bg_addsetting = true
|
||||
state.formData[0].checkbox = ['1','5']
|
||||
}
|
||||
//搜索权限列表
|
||||
const searchSaveList = () => {
|
||||
saveListItem()
|
||||
}
|
||||
const of_addsetting = () => {
|
||||
state.bg_addsetting = false
|
||||
state.searchParam.createName = ''
|
||||
@@ -1187,6 +1210,11 @@ import { message } from "ant-design-vue";
|
||||
state.tableLoadingAdd = false
|
||||
console.log(res,'res')
|
||||
})
|
||||
const workNums = state.tableData1.map(item=>item.workNum)
|
||||
state.tableDataAdd.forEach(item => {
|
||||
if(workNums.includes(item.userNo))
|
||||
item.status = 0
|
||||
})
|
||||
}
|
||||
const removeSave = () => {
|
||||
state.searchParam.createName = ''
|
||||
@@ -1194,26 +1222,23 @@ import { message } from "ant-design-vue";
|
||||
}
|
||||
//添加权限确定
|
||||
const addSettingUp = async () => {
|
||||
await savePermission({userList:state.saveList}).then((res)=>{
|
||||
console.log(res,'res')
|
||||
})
|
||||
await savePermission({userList:state.saveList,pid:state.saveListPid})
|
||||
saveListItem()
|
||||
of_addsetting()
|
||||
}
|
||||
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')
|
||||
await updateStatus({status:0}).then((res)=>{
|
||||
await updateStatus({status:0,id:record.id}).then((res)=>{
|
||||
if(res.code === 200){
|
||||
console.log(res,'res')
|
||||
message.success('启用成功')
|
||||
record.status = 0
|
||||
state.saveList.push(record)
|
||||
}
|
||||
})
|
||||
@@ -1233,6 +1258,7 @@ import { message } from "ant-design-vue";
|
||||
// searchStatusVal,
|
||||
listData,
|
||||
addAuths,
|
||||
searchSaveList,
|
||||
of_addsetting,
|
||||
searchSave,
|
||||
removeSave,
|
||||
@@ -1274,6 +1300,7 @@ import { message } from "ant-design-vue";
|
||||
// remarksUpdata,
|
||||
openEdit,
|
||||
authorityItem,
|
||||
saveListItem,
|
||||
changePagination,
|
||||
changePaginations,
|
||||
changePaginationsAdd,
|
||||
|
||||
Reference in New Issue
Block a user