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:
@@ -22,11 +22,11 @@
|
||||
style="width: 270px; height: 40px; border-radius: 8px;margin-right: 14px;"
|
||||
/>
|
||||
</div>
|
||||
<div class="down_header_btn btn1">
|
||||
<div class="down_header_btn btn1" @click="searchList">
|
||||
<div class="search"></div>
|
||||
<span class="btnText">搜索</span>
|
||||
</div>
|
||||
<div class="down_header_btn btn2">
|
||||
<div class="down_header_btn btn2" @click="searchNo">
|
||||
<div class="search"></div>
|
||||
<span class="btnText">重置</span>
|
||||
</div>
|
||||
@@ -154,9 +154,10 @@ import { useStore } from "vuex";
|
||||
const listData = async () => {
|
||||
state.tableLoading = true
|
||||
await getPage({
|
||||
id:route.query.id,
|
||||
pid:route.query.id,
|
||||
pageNo: state.params.pageNo,
|
||||
pageSize: state.params.pageSize,
|
||||
searchParam:state.searchName
|
||||
}).then((res) => {
|
||||
if(res.code === 200){
|
||||
state.tableLoading = false
|
||||
@@ -166,6 +167,15 @@ import { useStore } from "vuex";
|
||||
}
|
||||
})
|
||||
}
|
||||
const searchList = () => {
|
||||
state.params.pageNo = 1
|
||||
listData()
|
||||
}
|
||||
const searchNo = () => {
|
||||
state.searchName = ''
|
||||
state.params.pageNo = 1
|
||||
listData()
|
||||
}
|
||||
const downloadItem = (record) => {
|
||||
window.open(`/activityApi/evaluation/detail/downloadById?id=${record.id}`)
|
||||
};
|
||||
@@ -191,6 +201,8 @@ import { useStore } from "vuex";
|
||||
downloadItem,
|
||||
pagination,
|
||||
listData,
|
||||
searchList,
|
||||
searchNo,
|
||||
downloadAll,
|
||||
userInfo,
|
||||
}
|
||||
|
||||
@@ -50,19 +50,19 @@
|
||||
>
|
||||
<template #operation="{ record, column }">
|
||||
<a-space>
|
||||
<a-button type="link" @click="bgcheck(record)">
|
||||
<a-button v-if="trueFalse(record.permission,1)" type="link" @click="bgcheck(record)">
|
||||
<a-tooltip>
|
||||
<template #title>查看</template>
|
||||
<span class="check"></span>
|
||||
</a-tooltip>
|
||||
</a-button>
|
||||
<a-button type="link" @click="bgupload1(record)">
|
||||
<a-button type="link" @click="bgupload1(record)" v-if="trueFalse(record.permission,2)||trueFalse(record.permission,4)">
|
||||
<a-tooltip>
|
||||
<template #title>上传</template>
|
||||
<span class="upload"></span>
|
||||
</a-tooltip>
|
||||
</a-button>
|
||||
<a-button type="link" @click="downloadAll(record)">
|
||||
<a-button v-if="trueFalse(record.permission,5)" type="link" @click="downloadAll(record)">
|
||||
<a-tooltip>
|
||||
<template #title>下载</template>
|
||||
<span class="download"></span>
|
||||
@@ -78,7 +78,7 @@
|
||||
</a>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="0">
|
||||
<a-menu-item v-if="trueFalse(record.permission,4)" key="0">
|
||||
<a-button type="link" class="btn_item" @click="openEdit(record)">
|
||||
<span class="release"></span>
|
||||
编辑
|
||||
@@ -90,13 +90,13 @@
|
||||
权限设置
|
||||
</a-button>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="2">
|
||||
<a-menu-item key="2" v-if="trueFalse(record.permission,6)">
|
||||
<a-button type="link" class="btn_item" @click="deleteItem(record)">
|
||||
<span class="delete"></span>
|
||||
删除
|
||||
</a-button>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="3">
|
||||
<a-menu-item key="3" v-if="trueFalse(record.permission,3)">
|
||||
<a-button type="link" class="btn_item" @click="emptyItem(record)">
|
||||
<span class="empty"></span>
|
||||
清空
|
||||
@@ -632,10 +632,11 @@ import { message } from "ant-design-vue";
|
||||
const userInfo = computed(() => store.state.userInfo);
|
||||
const router = useRouter();
|
||||
const state = reactive({
|
||||
loadData: false,
|
||||
saveList: [],
|
||||
powerStatus:[],
|
||||
powerStatus:{},
|
||||
saveListPid: '',
|
||||
idValue: '',
|
||||
idValue: null,
|
||||
valueAll: [],
|
||||
uploadStatus: true,
|
||||
uploadId: '',
|
||||
@@ -694,6 +695,11 @@ import { message } from "ant-design-vue";
|
||||
state.tableLoading = true
|
||||
listData()
|
||||
})
|
||||
const trueFalse = (per,i) => {
|
||||
if (per) {
|
||||
return (per + "").split(",").some(t => t== i);
|
||||
}
|
||||
}
|
||||
//搜索
|
||||
const serchList = () => {
|
||||
state.tableLoading = true
|
||||
@@ -710,7 +716,8 @@ import { message } from "ant-design-vue";
|
||||
await list({
|
||||
evaluationName: state.serchName,
|
||||
pageNo: state.searchParam.pageNo,
|
||||
pageSize: state.searchParam.pageSize
|
||||
pageSize: state.searchParam.pageSize,
|
||||
workNum:userInfo.value.userNo
|
||||
}).then((res) => {
|
||||
console.log(res,'resdata')
|
||||
state.tableData = res.data.records
|
||||
@@ -995,12 +1002,13 @@ import { message } from "ant-design-vue";
|
||||
}
|
||||
const bgupload1 = (record) => {
|
||||
console.log(record,'record')
|
||||
state.btShowEdit = trueFalse(record.permission,2)
|
||||
state.uploadId = record.id
|
||||
state.uploadName = userInfo.value.realName
|
||||
state.formData = {...record}
|
||||
state.uploadStatus = false
|
||||
state.bg_check = true;
|
||||
state.btShow = false
|
||||
state.btShow = trueFalse(record.permission,4)
|
||||
}
|
||||
const downloadAll = async (record) => {
|
||||
window.open(`/activityApi/evaluation/download?id=${record.id}`);
|
||||
@@ -1010,6 +1018,7 @@ import { message } from "ant-design-vue";
|
||||
state.errorMessage = ''
|
||||
state.uploadId = ''
|
||||
state.uploadName = ''
|
||||
state.loadData = false
|
||||
state.uploadStatus = true
|
||||
state.btShow = true
|
||||
state.btShowEdit = true
|
||||
@@ -1044,7 +1053,7 @@ import { message } from "ant-design-vue";
|
||||
console.log(res.data,'data')
|
||||
})
|
||||
}
|
||||
if(state.valueAll.length != 0){
|
||||
if(state.valueAll.length != 0 && !state.loadData){
|
||||
state.valueAll.forEach((item)=>{
|
||||
if(item.createId){
|
||||
item.createId = userInfo.value.userId
|
||||
@@ -1138,7 +1147,6 @@ import { message } from "ant-design-vue";
|
||||
return false
|
||||
}
|
||||
const handleChange = (info) => {
|
||||
console.log(info,'aaa')
|
||||
let resFileList = [...info.fileList];
|
||||
|
||||
resFileList = resFileList.slice(-2);
|
||||
@@ -1196,6 +1204,7 @@ import { message } from "ant-design-vue";
|
||||
state.bg_check = true
|
||||
state.btShow = true
|
||||
state.btShowEdit = false
|
||||
state.loadData = true
|
||||
state.formData = {...record}
|
||||
}
|
||||
//权限列表
|
||||
@@ -1283,12 +1292,13 @@ import { message } from "ant-design-vue";
|
||||
}
|
||||
//添加权限确定
|
||||
const addSettingUp = async () => {
|
||||
console.log(state.saveList,'saveList')
|
||||
await savePermission({userList:state.saveList,pid:state.saveListPid})
|
||||
saveListItem()
|
||||
of_addsetting()
|
||||
}
|
||||
const powerSetting = async (record) => {
|
||||
state.powerStatus.push(record)
|
||||
state.powerStatus = (record)
|
||||
state.bg_power = true
|
||||
state.checkclick = record.permission
|
||||
}
|
||||
@@ -1296,25 +1306,27 @@ import { message } from "ant-design-vue";
|
||||
state.bg_power = false
|
||||
}
|
||||
const powerTrue = async () => {
|
||||
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()
|
||||
}
|
||||
})
|
||||
// state.tableLoadingAdd = true
|
||||
state.powerStatus.permission = state.checkclick.join(",")
|
||||
// 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()
|
||||
}
|
||||
const textEnableAdd = async (record) => {
|
||||
console.log(record,'record')
|
||||
await updateStatus({status:0,id:record.id}).then((res)=>{
|
||||
if(res.code === 200){
|
||||
console.log(res,'res')
|
||||
message.success('启用成功')
|
||||
record.statusList = 0
|
||||
state.saveList.push(record)
|
||||
if(state.powerStatus.id === record.id){
|
||||
state.saveList.push(state.powerStatus)
|
||||
}else{
|
||||
state.saveList.push(record)
|
||||
}
|
||||
saveListItem()
|
||||
}
|
||||
})
|
||||
@@ -1347,6 +1359,7 @@ import { message } from "ant-design-vue";
|
||||
searchStatusVal2,
|
||||
serchList,
|
||||
serchListNo,
|
||||
trueFalse,
|
||||
columns,
|
||||
columnsAdd,
|
||||
columns2,
|
||||
|
||||
Reference in New Issue
Block a user