mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
Merge branch 'zcwy-0306' into dev0223
This commit is contained in:
@@ -77,6 +77,7 @@ import { useStore } from "vuex";
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
searchName: '',
|
searchName: '',
|
||||||
|
tableLoading: false,
|
||||||
tableData:[],
|
tableData:[],
|
||||||
total: 0,
|
total: 0,
|
||||||
params: {
|
params: {
|
||||||
@@ -145,20 +146,25 @@ import { useStore } from "vuex";
|
|||||||
const changePagination = (page,pageSize) => {
|
const changePagination = (page,pageSize) => {
|
||||||
state.params.pageNo = page
|
state.params.pageNo = page
|
||||||
state.params.pageSize = pageSize
|
state.params.pageSize = pageSize
|
||||||
|
listData()
|
||||||
}
|
}
|
||||||
const downloadAll = (record) => {
|
const downloadAll = (record) => {
|
||||||
window.open(`/activityApi/evaluation/download?id=${route.query.id}`);
|
window.open(`/activityApi/evaluation/download?id=${route.query.id}`);
|
||||||
}
|
}
|
||||||
const listData = async () => {
|
const listData = async () => {
|
||||||
|
state.tableLoading = true
|
||||||
await getPage({
|
await getPage({
|
||||||
id:route.query.id,
|
id:route.query.id,
|
||||||
|
pageNo: state.params.pageNo,
|
||||||
|
pageSize: state.params.pageSize,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
state.tableData = res.data.records,
|
if(res.code === 200){
|
||||||
console.log(state.tableData,'data')
|
state.tableLoading = false
|
||||||
state.total = res.data.total
|
state.tableData = res.data.records,
|
||||||
|
console.log(state.tableData,'data')
|
||||||
|
state.total = res.data.total
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
const downloadItem = (record) => {
|
const downloadItem = (record) => {
|
||||||
window.open(`/activityApi/evaluation/detail/downloadById?id=${record.id}`)
|
window.open(`/activityApi/evaluation/detail/downloadById?id=${record.id}`)
|
||||||
|
|||||||
@@ -633,6 +633,7 @@ import { message } from "ant-design-vue";
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
saveList: [],
|
saveList: [],
|
||||||
|
powerStatus:[],
|
||||||
saveListPid: '',
|
saveListPid: '',
|
||||||
idValue: '',
|
idValue: '',
|
||||||
valueAll: [],
|
valueAll: [],
|
||||||
@@ -734,7 +735,12 @@ import { message } from "ant-design-vue";
|
|||||||
const changePaginations = (page,pageSize) => {
|
const changePaginations = (page,pageSize) => {
|
||||||
state.params.pageNo = page
|
state.params.pageNo = page
|
||||||
state.params.pageSize = pageSize
|
state.params.pageSize = pageSize
|
||||||
|
saveListItem()
|
||||||
}
|
}
|
||||||
|
watch(()=>state.params.pageSize,()=>{
|
||||||
|
state.params.pageNo = 1
|
||||||
|
saveListItem()
|
||||||
|
})
|
||||||
// 添加权限
|
// 添加权限
|
||||||
const paginationAdd = computed(() => ({
|
const paginationAdd = computed(() => ({
|
||||||
total: state.totalAdd,
|
total: state.totalAdd,
|
||||||
@@ -747,6 +753,7 @@ import { message } from "ant-design-vue";
|
|||||||
const changePaginationsAdd = (page,pageSize) => {
|
const changePaginationsAdd = (page,pageSize) => {
|
||||||
state.paramsAdd.pageNo = page
|
state.paramsAdd.pageNo = page
|
||||||
state.paramsAdd.pageSize = pageSize
|
state.paramsAdd.pageSize = pageSize
|
||||||
|
searchSave()
|
||||||
}
|
}
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{
|
{
|
||||||
@@ -836,11 +843,41 @@ import { message } from "ant-design-vue";
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "权限",
|
title: "权限",
|
||||||
dataIndex: "permissionList",
|
dataIndex: "permission",
|
||||||
key: "permissionList",
|
key: "permission",
|
||||||
className: "h",
|
className: "h",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
|
customRender: ({ text }) => {
|
||||||
|
if(text == null){
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
const permissions = text.split(',').map(Number);
|
||||||
|
const displayTexts = [];
|
||||||
|
for (const permission of permissions) {
|
||||||
|
switch (permission) {
|
||||||
|
case 1:
|
||||||
|
displayTexts.push("查看");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
displayTexts.push("上传");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
displayTexts.push("清空");
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
displayTexts.push("编辑");
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
displayTexts.push("下载");
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
displayTexts.push("删除");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return displayTexts.join(", ");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
@@ -1168,6 +1205,8 @@ import { message } from "ant-design-vue";
|
|||||||
pid:state.saveListPid,
|
pid:state.saveListPid,
|
||||||
nameOrWorkNum:state.searchParam.createNames,
|
nameOrWorkNum:state.searchParam.createNames,
|
||||||
status:state.searchParam.status2,
|
status:state.searchParam.status2,
|
||||||
|
pageNo: state.params.pageNo,
|
||||||
|
pageSize: state.params.pageSize
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
console.log(res,'res')
|
console.log(res,'res')
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
@@ -1185,6 +1224,7 @@ import { message } from "ant-design-vue";
|
|||||||
saveListItem()
|
saveListItem()
|
||||||
}
|
}
|
||||||
const of_setting = () => {
|
const of_setting = () => {
|
||||||
|
state.params.pageNo = 1
|
||||||
state.bg_setting = false
|
state.bg_setting = false
|
||||||
}
|
}
|
||||||
const settingUp = () => {
|
const settingUp = () => {
|
||||||
@@ -1209,6 +1249,7 @@ import { message } from "ant-design-vue";
|
|||||||
}
|
}
|
||||||
//搜索权限列表
|
//搜索权限列表
|
||||||
const searchSaveList = () => {
|
const searchSaveList = () => {
|
||||||
|
state.params.pageNo = 1
|
||||||
saveListItem()
|
saveListItem()
|
||||||
}
|
}
|
||||||
const of_addsetting = () => {
|
const of_addsetting = () => {
|
||||||
@@ -1219,15 +1260,21 @@ import { message } from "ant-design-vue";
|
|||||||
//搜索权限
|
//搜索权限
|
||||||
const searchSave = async () => {
|
const searchSave = async () => {
|
||||||
state.tableLoadingAdd = true
|
state.tableLoadingAdd = true
|
||||||
await adminList({keyword:state.searchParam.createName}).then((res)=>{
|
await adminList({
|
||||||
state.tableDataAdd = res.data
|
keyword:state.searchParam.createName,
|
||||||
state.tableLoadingAdd = false
|
pageNo: state.paramsAdd.pageNo,
|
||||||
console.log(res,'res')
|
pageSize: state.paramsAdd.pageSize,
|
||||||
})
|
}).then((res)=>{
|
||||||
const workNums = state.tableData1.map(item=>item.workNum)
|
if(res.code === 200){
|
||||||
state.tableDataAdd.forEach(item => {
|
state.tableDataAdd = res.data
|
||||||
if(workNums.includes(item.userNo))
|
state.tableLoadingAdd = false
|
||||||
item.status = 0
|
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 = () => {
|
||||||
@@ -1236,20 +1283,28 @@ import { message } from "ant-design-vue";
|
|||||||
}
|
}
|
||||||
//添加权限确定
|
//添加权限确定
|
||||||
const addSettingUp = async () => {
|
const addSettingUp = async () => {
|
||||||
console.log(state.saveList,'state.saveList')
|
|
||||||
await savePermission({userList:state.saveList,pid:state.saveListPid})
|
await savePermission({userList:state.saveList,pid:state.saveListPid})
|
||||||
saveListItem()
|
saveListItem()
|
||||||
of_addsetting()
|
of_addsetting()
|
||||||
}
|
}
|
||||||
const powerSetting = async (record) => {
|
const powerSetting = async (record) => {
|
||||||
|
state.powerStatus.push(record)
|
||||||
state.bg_power = true
|
state.bg_power = true
|
||||||
state.checkclick = record.checkclick
|
state.checkclick = record.permission
|
||||||
}
|
}
|
||||||
const of_power = () => {
|
const of_power = () => {
|
||||||
state.bg_power = false
|
state.bg_power = false
|
||||||
}
|
}
|
||||||
const powerTrue = () => {
|
const powerTrue = async () => {
|
||||||
console.log(state.checkclick,'sss')
|
state.tableLoadingAdd = true
|
||||||
|
console.log(state.powerStatus,'sss')
|
||||||
|
state.powerStatus[0].permission = state.checkclick.join(",")
|
||||||
|
await savePermission({userList:state.powerStatus,pid:state.saveListPid}).then((res)=>{
|
||||||
|
if(res.code === 200){
|
||||||
|
searchSave()
|
||||||
|
saveListItem()
|
||||||
|
}
|
||||||
|
})
|
||||||
of_power()
|
of_power()
|
||||||
}
|
}
|
||||||
const textEnableAdd = async (record) => {
|
const textEnableAdd = async (record) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user