mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 02:46:45 +08:00
Merge branch 'zcwy-zsx0223' into dev0223
This commit is contained in:
@@ -67,8 +67,6 @@ export default createStore({
|
|||||||
},
|
},
|
||||||
SET_PERMISSION(state, permissions) {
|
SET_PERMISSION(state, permissions) {
|
||||||
state.menus = permissions;
|
state.menus = permissions;
|
||||||
state.menus = [...permissions,'/evaluationupload'];
|
|
||||||
console.log(state.menus,"state.menus");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -49,6 +49,69 @@
|
|||||||
:pagination="false"
|
:pagination="false"
|
||||||
>
|
>
|
||||||
<template #operation="{ record, column }">
|
<template #operation="{ record, column }">
|
||||||
|
<a-space style="margin-left: 70px">
|
||||||
|
<template v-for="(permissionCode, index) in (record.permission.split(',').slice(0,2))">
|
||||||
|
<a-button
|
||||||
|
v-if="trueFalse(record.permission, permissionCode)"
|
||||||
|
type="link"
|
||||||
|
:key="`button${index}`"
|
||||||
|
@click="() => handleButtonClick(record, permissionCode)"
|
||||||
|
>
|
||||||
|
<a-tooltip>
|
||||||
|
<template #title>
|
||||||
|
<span v-if="permissionCode == 1">查看</span>
|
||||||
|
<span v-else-if="permissionCode == 2">上传</span>
|
||||||
|
<span v-else-if="permissionCode == 5">下载</span>
|
||||||
|
<span v-else-if="permissionCode == 4">编辑</span>
|
||||||
|
<span v-else-if="permissionCode == 6">删除</span>
|
||||||
|
<span v-else-if="permissionCode == 3">清空</span>
|
||||||
|
</template>
|
||||||
|
<span v-if="permissionCode == 1" class="check"></span>
|
||||||
|
<span v-else-if="permissionCode == 2" class="upload"></span>
|
||||||
|
<span v-else-if="permissionCode == 5" class="download"></span>
|
||||||
|
<span v-else-if="permissionCode == 4" class="release"></span>
|
||||||
|
<span v-else-if="permissionCode == 6" class="delete"></span>
|
||||||
|
<span v-else-if="permissionCode == 3" class="empty"></span>
|
||||||
|
</a-tooltip>
|
||||||
|
</a-button>
|
||||||
|
</template>
|
||||||
|
<a-button
|
||||||
|
type="link"
|
||||||
|
:key="'permissionSetting'"
|
||||||
|
@click="authorityItem(record)"
|
||||||
|
>
|
||||||
|
<a-tooltip title="权限设置">
|
||||||
|
<span class="authority"></span>
|
||||||
|
</a-tooltip>
|
||||||
|
</a-button>
|
||||||
|
<a-dropdown
|
||||||
|
v-if="record.permission.split(',').length > 2"
|
||||||
|
:getPopupContainer="(triggerNode) => triggerNode.parentNode"
|
||||||
|
:trigger="['click']"
|
||||||
|
>
|
||||||
|
<a class="ant-dropdown-link" @click.prevent>
|
||||||
|
更多 <DownOutlined />
|
||||||
|
</a>
|
||||||
|
<template #overlay>
|
||||||
|
<a-menu>
|
||||||
|
<template v-for="(permissionCode, index) in (record.permission.split(',').slice(2))">
|
||||||
|
<a-menu-item
|
||||||
|
v-if="trueFalse(record.permission, permissionCode)"
|
||||||
|
:key="`${index}`"
|
||||||
|
@click="() => handleButtonClick(record, permissionCode)"
|
||||||
|
>
|
||||||
|
<a-button type="link" class="btn_item">
|
||||||
|
<span :class="getIconClass(permissionCode)"></span>
|
||||||
|
{{ getButtonTitle(permissionCode) }}
|
||||||
|
</a-button>
|
||||||
|
</a-menu-item>
|
||||||
|
</template>
|
||||||
|
</a-menu>
|
||||||
|
</template>
|
||||||
|
</a-dropdown>
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
|
<!-- <template #operation="{ record, column }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-if="trueFalse(record.permission,1)" type="link" @click="bgcheck(record)">
|
<a-button v-if="trueFalse(record.permission,1)" type="link" @click="bgcheck(record)">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
@@ -103,7 +166,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template> -->
|
||||||
</a-table>
|
</a-table>
|
||||||
<div class="tableBox">
|
<div class="tableBox">
|
||||||
<div class="pa">
|
<div class="pa">
|
||||||
@@ -234,7 +297,7 @@
|
|||||||
<div class="file_updata">
|
<div class="file_updata">
|
||||||
<div class="updatabox" style="margin-right: 5px">
|
<div class="updatabox" style="margin-right: 5px">
|
||||||
<div
|
<div
|
||||||
:class="`${{uploading: 'updatacolor3', done: 'updatacolor' ,error: 'updatacolor2'}[record.status] || 'updatacolor'}`"
|
:class="`${{uploading: 'updatacolor3', done: 'updatacolor3' ,error: 'updatacolor3'}[record.status] || 'updatacolor'}`"
|
||||||
:style="{width:`${record.status==='uploading'?parseInt(record.percent):100}%`}">
|
:style="{width:`${record.status==='uploading'?parseInt(record.percent):100}%`}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -242,7 +305,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #uploadAction="{record}">
|
<template #uploadAction="{record}">
|
||||||
<a-button type="link" @click="failedDownload(record)">下载</a-button>
|
<a-button type="link" @click="failedDownload(record)">记录下载</a-button>
|
||||||
<span style="margin-left: 10px"></span>
|
<span style="margin-left: 10px"></span>
|
||||||
<a-button type="link" @click="delUploadList(record)">删除</a-button>
|
<a-button type="link" @click="delUploadList(record)">删除</a-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -870,7 +933,7 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
width: "20%",
|
width: "20%",
|
||||||
dataIndex: "id",
|
dataIndex: "id",
|
||||||
key: "id",
|
key: "id",
|
||||||
align: "right",
|
align: "left",
|
||||||
slots: { customRender: "operation" },
|
slots: { customRender: "operation" },
|
||||||
};
|
};
|
||||||
if (!addedOperationColumn && state.isRegularAdministrator == '0') {
|
if (!addedOperationColumn && state.isRegularAdministrator == '0') {
|
||||||
@@ -1093,7 +1156,7 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
className: "h",
|
className: "h",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "工号",
|
title: "工号",
|
||||||
@@ -1102,7 +1165,7 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
className: "h",
|
className: "h",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "组织部门",
|
title: "组织部门",
|
||||||
@@ -1111,18 +1174,18 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
className: "h",
|
className: "h",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "归属组织",
|
||||||
|
dataIndex: "orgName",
|
||||||
|
key: "orgName",
|
||||||
|
className: "h",
|
||||||
|
ellipsis: true,
|
||||||
|
align: "center",
|
||||||
width: 200,
|
width: 200,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: "添加时间",
|
|
||||||
// dataIndex: "createTime",
|
|
||||||
// key: "createTime",
|
|
||||||
// className: "h",
|
|
||||||
// ellipsis: true,
|
|
||||||
// align: "center",
|
|
||||||
// width: 100,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: "操作",
|
// title: "操作",
|
||||||
// width: "20%",
|
// width: "20%",
|
||||||
// fixed: 'right',
|
// fixed: 'right',
|
||||||
@@ -1156,11 +1219,67 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
width: '80px',
|
width: '100px',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
slots: { customRender: 'uploadAction' },
|
slots: { customRender: 'uploadAction' },
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
const handleButtonClick = (record, permissionCode) => {
|
||||||
|
switch (permissionCode) {
|
||||||
|
case '1':
|
||||||
|
bgcheck(record);
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
bgupload1(record);
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
downloadAll(record);
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
openEdit(record);
|
||||||
|
break;
|
||||||
|
case '6':
|
||||||
|
deleteItem(record);
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
emptyItem(record);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getButtonTitle(permissionCode) {
|
||||||
|
switch (permissionCode) {
|
||||||
|
case '1':
|
||||||
|
return '查看';
|
||||||
|
case '2':
|
||||||
|
return '上传';
|
||||||
|
case '3':
|
||||||
|
return '清空';
|
||||||
|
case '4':
|
||||||
|
return '编辑';
|
||||||
|
case '5':
|
||||||
|
return '下载';
|
||||||
|
case '6':
|
||||||
|
return '删除';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getIconClass(permissionCode) {
|
||||||
|
switch (permissionCode) {
|
||||||
|
case '1':
|
||||||
|
return 'check';
|
||||||
|
case '2':
|
||||||
|
return 'upload';
|
||||||
|
case '3':
|
||||||
|
return 'empty';
|
||||||
|
case '4':
|
||||||
|
return 'release';
|
||||||
|
case '5':
|
||||||
|
return 'download';
|
||||||
|
case '6':
|
||||||
|
return 'delete';
|
||||||
|
}
|
||||||
|
}
|
||||||
const textDisabled = async (record) => {
|
const textDisabled = async (record) => {
|
||||||
await updateStatus({status:1,id:record.id}).then((res)=>{
|
await updateStatus({status:1,id:record.id}).then((res)=>{
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
@@ -1670,6 +1789,9 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
columns,
|
columns,
|
||||||
columnsAdd,
|
columnsAdd,
|
||||||
columnsUpload,
|
columnsUpload,
|
||||||
|
handleButtonClick,
|
||||||
|
getIconClass,
|
||||||
|
getButtonTitle,
|
||||||
columns2,
|
columns2,
|
||||||
bgupload,
|
bgupload,
|
||||||
of_exit,
|
of_exit,
|
||||||
@@ -1719,6 +1841,9 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .ant-dropdown-content{
|
||||||
|
width: 84px;
|
||||||
|
}
|
||||||
.back_color{
|
.back_color{
|
||||||
::v-deep .ant-table-wrapper .ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td{
|
::v-deep .ant-table-wrapper .ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td{
|
||||||
background: initial;
|
background: initial;
|
||||||
@@ -1891,6 +2016,41 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
background: url("../../assets/images/evaluation/download.png") no-repeat;
|
background: url("../../assets/images/evaluation/download.png") no-repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
}
|
}
|
||||||
|
.release{
|
||||||
|
width: 19px;
|
||||||
|
height: 20px;
|
||||||
|
background: url("../../assets/images/evaluation/release.png") no-repeat;
|
||||||
|
background-size: 100%;
|
||||||
|
// margin-right: 2px;
|
||||||
|
}
|
||||||
|
.authority{
|
||||||
|
width: 19px;
|
||||||
|
height: 20px;
|
||||||
|
background: url("../../assets/images/evaluation/authority.png") no-repeat;
|
||||||
|
background-size: 100%;
|
||||||
|
// margin-right: 2px;
|
||||||
|
}
|
||||||
|
.edit{
|
||||||
|
width: 19px;
|
||||||
|
height: 20px;
|
||||||
|
background: url("../../assets/images/evaluation/edit.png") no-repeat;
|
||||||
|
background-size: 100%;
|
||||||
|
// margin-right: 2px;
|
||||||
|
}
|
||||||
|
.delete{
|
||||||
|
width: 19px;
|
||||||
|
height: 20px;
|
||||||
|
background: url("../../assets/images/evaluation/delete.png") no-repeat;
|
||||||
|
background-size: 100%;
|
||||||
|
// margin-right: 2px;
|
||||||
|
}
|
||||||
|
.empty{
|
||||||
|
width: 19px;
|
||||||
|
height: 20px;
|
||||||
|
background: url("../../assets/images/evaluation/empty.png") no-repeat;
|
||||||
|
background-size: 100%;
|
||||||
|
// margin-right: 2px;
|
||||||
|
}
|
||||||
.tableBox {
|
.tableBox {
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
margin: 20px 38px 30px;
|
margin: 20px 38px 30px;
|
||||||
@@ -2267,40 +2427,61 @@ import {downLoadZip} from "@/utils/zipdownload";
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
.check{
|
||||||
|
width: 15px;
|
||||||
|
height: 16px;
|
||||||
|
background: url("../../assets/images/evaluation/check.png") no-repeat;
|
||||||
|
background-size: 100%;
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
.download{
|
||||||
|
width: 15px;
|
||||||
|
height: 16px;
|
||||||
|
background: url("../../assets/images/evaluation/download.png") no-repeat;
|
||||||
|
background-size: 100%;
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
.upload{
|
||||||
|
width: 15px;
|
||||||
|
height: 16px;
|
||||||
|
background: url("../../assets/images/evaluation/upload.png") no-repeat;
|
||||||
|
background-size: 100%;
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
.release{
|
.release{
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background: url("../../assets/images/evaluation/release.png") no-repeat;
|
background: url("../../assets/images/evaluation/release.png") no-repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
margin-right: 2px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
.authority{
|
.authority{
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background: url("../../assets/images/evaluation/authority.png") no-repeat;
|
background: url("../../assets/images/evaluation/authority.png") no-repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
margin-right: 2px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
.edit{
|
.edit{
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background: url("../../assets/images/evaluation/edit.png") no-repeat;
|
background: url("../../assets/images/evaluation/edit.png") no-repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
margin-right: 2px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
.delete{
|
.delete{
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background: url("../../assets/images/evaluation/delete.png") no-repeat;
|
background: url("../../assets/images/evaluation/delete.png") no-repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
margin-right: 2px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
.empty{
|
.empty{
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background: url("../../assets/images/evaluation/empty.png") no-repeat;
|
background: url("../../assets/images/evaluation/empty.png") no-repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
margin-right: 2px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user