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