基本完成1.0
parent
ecacb4dc02
commit
5f860e2fed
|
@ -170,7 +170,7 @@ export default {
|
|||
this.$emit("current-change", val);
|
||||
},
|
||||
setCurrentRow(row) {
|
||||
this.$refs.elTableRef.setCurrentRow(row);
|
||||
this.$refs.elTableRef?.setCurrentRow(row);
|
||||
},
|
||||
clearSelection() {
|
||||
this.$refs.elTableRef?.clearSelection();
|
||||
|
|
|
@ -1,8 +1,18 @@
|
|||
<template>
|
||||
<el-dialog title="选择人员" :visible="dialogVisible" width="50%" @close="handleClose">
|
||||
<el-dialog
|
||||
title="选择人员"
|
||||
:visible="dialogVisible"
|
||||
width="50%"
|
||||
@close="handleClose"
|
||||
>
|
||||
<div class="select-user-container">
|
||||
<div class="org-tree">
|
||||
<el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick" default-expand-all />
|
||||
<el-tree
|
||||
:data="treeData"
|
||||
:props="defaultProps"
|
||||
@node-click="handleNodeClick"
|
||||
default-expand-all
|
||||
/>
|
||||
</div>
|
||||
<div class="user-list">
|
||||
<CustomTable
|
||||
|
@ -10,20 +20,32 @@
|
|||
:columns="columns"
|
||||
:tableData="userData"
|
||||
:total="total"
|
||||
:show-selection="true"
|
||||
:show-selection="false"
|
||||
:show-index="true"
|
||||
:table-height="tableHeight"
|
||||
:multiSelect="multiSelect"
|
||||
@selection-change="handleSelectionChange"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
rowKey="userId"
|
||||
:rowClick="
|
||||
(row) => {
|
||||
rowClick(row);
|
||||
}
|
||||
"
|
||||
maxHeight="380"
|
||||
>
|
||||
<template slot="operation" slot-scope="{ row }">
|
||||
<div class="operation-buttons">
|
||||
<el-button text type="primary" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button text type="primary" @click="showTimesheet(row)">工作日志</el-button>
|
||||
<el-button text type="danger" @click="handleDelete(row)">删除</el-button>
|
||||
<el-button text type="primary" @click="handleEdit(row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button text type="primary" @click="showTimesheet(row)"
|
||||
>工作日志</el-button
|
||||
>
|
||||
<el-button text type="danger" @click="handleDelete(row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</CustomTable>
|
||||
|
@ -39,8 +61,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import CustomTable from '@/components/CustomTable.vue'
|
||||
import { systemApi } from '@/utils/api'
|
||||
import CustomTable from "@/components/CustomTable.vue";
|
||||
import { systemApi } from "@/utils/api";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -66,63 +88,73 @@ export default {
|
|||
pageSize: 10,
|
||||
total: 0,
|
||||
selectedUsers: [],
|
||||
currentDepartment: '',
|
||||
tableHeight: '350', // 设置一个合适的高度
|
||||
currentDepartment: "",
|
||||
tableHeight: "350", // 设置一个合适的高度
|
||||
treeData: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label',
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
columns: [
|
||||
{ prop: 'nickName', label: '姓名' },
|
||||
{ prop: 'dept', label: '部门', type: 'status', callback: (data) => data?.deptName },
|
||||
{ prop: 'roles', label: '角色', type: 'status', callback: (data) => data.map(ele => ele.roleName).join(',') },
|
||||
{ prop: "nickName", label: "姓名" },
|
||||
{
|
||||
prop: "dept",
|
||||
label: "部门",
|
||||
type: "status",
|
||||
callback: (data) => data?.deptName,
|
||||
},
|
||||
{
|
||||
prop: "roles",
|
||||
label: "角色",
|
||||
type: "status",
|
||||
callback: (data) => data.map((ele) => ele.roleName).join(","),
|
||||
},
|
||||
],
|
||||
userData: [],
|
||||
customTableRef: null,
|
||||
isInternalChange: false,
|
||||
}
|
||||
};
|
||||
},
|
||||
emits: [ 'close', 'confirm'],
|
||||
emits: ["close", "confirm"],
|
||||
methods: {
|
||||
handleNodeClick(data) {
|
||||
this.currentDepartment = data.id
|
||||
this.currentPage = 1
|
||||
this.fetchUserList()
|
||||
this.currentDepartment = data.id;
|
||||
this.currentPage = 1;
|
||||
this.fetchUserList();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.currentPage = val
|
||||
this.fetchUserList()
|
||||
this.currentPage = val;
|
||||
this.fetchUserList();
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.fetchUserList()
|
||||
this.pageSize = val;
|
||||
this.fetchUserList();
|
||||
},
|
||||
handleClose() {
|
||||
this.$emit('close')
|
||||
this.$emit("close");
|
||||
},
|
||||
handleConfirm() {
|
||||
this.$emit('confirm', this.selectedUsers)
|
||||
this.handleClose()
|
||||
this.$emit("confirm", this.selectedUsers);
|
||||
this.handleClose();
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
if (this.isInternalChange) return
|
||||
if (this.isInternalChange) return;
|
||||
|
||||
if (!this.multiSelect) {
|
||||
this.isInternalChange = true
|
||||
this.isInternalChange = true;
|
||||
this.$nextTick(() => {
|
||||
if (val.length > 0) {
|
||||
const lastSelected = val[val.length - 1]
|
||||
this.selectedUsers = [lastSelected]
|
||||
this.$refs.customTableRef.clearSelection()
|
||||
this.$refs.customTableRef.toggleRowSelection(lastSelected, true)
|
||||
const lastSelected = val[val.length - 1];
|
||||
this.selectedUsers = [lastSelected];
|
||||
this.$refs.customTableRef.clearSelection();
|
||||
this.$refs.customTableRef.toggleRowSelection(lastSelected, true);
|
||||
} else {
|
||||
this.selectedUsers = []
|
||||
this.selectedUsers = [];
|
||||
}
|
||||
this.isInternalChange = false
|
||||
})
|
||||
this.isInternalChange = false;
|
||||
});
|
||||
} else {
|
||||
this.selectedUsers = val
|
||||
this.selectedUsers = val;
|
||||
}
|
||||
},
|
||||
fetchUserList: async function () {
|
||||
|
@ -130,42 +162,82 @@ export default {
|
|||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
deptId: this.currentDepartment,
|
||||
})
|
||||
this.userData = response.rows
|
||||
this.total = response.total
|
||||
});
|
||||
this.userData = response.rows;
|
||||
this.total = response.total;
|
||||
},
|
||||
fetchTreeData: async function () {
|
||||
const response = await systemApi.getDeptTree()
|
||||
this.treeData = response.data
|
||||
const response = await systemApi.getDeptTree();
|
||||
this.treeData = response.data;
|
||||
},
|
||||
currentRow(val) {
|
||||
this.selectedUsers = [val];
|
||||
},
|
||||
rowClick(row) {
|
||||
if (row.userId == this.selectedUsers[0]?.userId)
|
||||
this.$refs.customTableRef.$refs.elTableRef.setCurrentRow();
|
||||
else this.selectedUsers = [row];
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// currentSelectedUser: {
|
||||
// handler(newVal) {
|
||||
// this.isInternalChange = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.selectedUsers = newVal;
|
||||
// if (this.$refs.customTableRef) {
|
||||
// this.$refs.customTableRef.clearSelection();
|
||||
// newVal.forEach((user) => {
|
||||
// const row = this.userData.find(
|
||||
// (item) => item.userId === user.userId
|
||||
// );
|
||||
// if (row) {
|
||||
// this.$refs.customTableRef.toggleRowSelection(row, true);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// this.isInternalChange = false;
|
||||
// });
|
||||
// },
|
||||
// immediate: true,
|
||||
// deep: true,
|
||||
// },
|
||||
currentSelectedUser: {
|
||||
handler(newVal) {
|
||||
this.isInternalChange = true
|
||||
this.$nextTick(() => {
|
||||
this.selectedUsers = newVal
|
||||
if (this.$refs.customTableRef) {
|
||||
this.$refs.customTableRef.clearSelection()
|
||||
newVal.forEach(user => {
|
||||
const row = this.userData.find(item => item.userId === user.userId)
|
||||
if (row) {
|
||||
this.$refs.customTableRef.toggleRowSelection(row, true)
|
||||
}
|
||||
})
|
||||
let row = this.userData.find(
|
||||
(ele) => ele.userId == newVal[0]?.userId
|
||||
);
|
||||
if (row) {
|
||||
this.$refs.customTableRef?.setCurrentRow(row);
|
||||
this.selectedUsers = [row];
|
||||
} else this.$refs.customTableRef?.setCurrentRow();
|
||||
});
|
||||
},
|
||||
immediate: true,
|
||||
deep: true,
|
||||
},
|
||||
userData: {
|
||||
handler(newVal) {
|
||||
this.$nextTick(() => {
|
||||
let row = this.userData.find(
|
||||
(ele) => ele.userId == this.currentSelectedUser[0]?.userId
|
||||
);
|
||||
if (row) {
|
||||
this.selectedUsers = [row];
|
||||
this.$refs.customTableRef?.setCurrentRow(row);
|
||||
}
|
||||
this.isInternalChange = false
|
||||
})
|
||||
});
|
||||
},
|
||||
immediate: true,
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.fetchTreeData()
|
||||
this.fetchUserList()
|
||||
this.fetchTreeData();
|
||||
this.fetchUserList();
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -206,6 +278,10 @@ export default {
|
|||
margin-left: 0;
|
||||
}
|
||||
::v-deep .el-table {
|
||||
max-height:360px !important;
|
||||
max-height: 360px !important;
|
||||
}
|
||||
</style>
|
||||
::v-deep tr.el-table__row.current-row .el-table__cell {
|
||||
background-color: #409eff !important;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -72,7 +72,7 @@ export default {
|
|||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #d2d1d1;
|
||||
background-color: #c8c8c8;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,36 +1,60 @@
|
|||
<template>
|
||||
<div id="tags-view-container" class="tags-view-container">
|
||||
<scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
|
||||
<scroll-pane
|
||||
ref="scrollPane"
|
||||
class="tags-view-wrapper"
|
||||
@scroll="handleScroll"
|
||||
>
|
||||
<router-link
|
||||
v-for="tag in visitedViews"
|
||||
ref="tag"
|
||||
:key="tag.path"
|
||||
:class="isActive(tag)?'active':''"
|
||||
:class="isActive(tag) ? 'active' : ''"
|
||||
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
|
||||
tag="span"
|
||||
class="tags-view-item"
|
||||
:style="activeStyle(tag)"
|
||||
@click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''"
|
||||
@contextmenu.prevent.native="openMenu(tag,$event)"
|
||||
@click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''"
|
||||
@contextmenu.prevent.native="openMenu(tag, $event)"
|
||||
>
|
||||
{{ tag.title }}
|
||||
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
|
||||
<span
|
||||
v-if="!isAffix(tag)"
|
||||
class="el-icon-close"
|
||||
@click.prevent.stop="closeSelectedTag(tag)"
|
||||
/>
|
||||
</router-link>
|
||||
</scroll-pane>
|
||||
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
|
||||
<li @click="refreshSelectedTag(selectedTag)"><i class="el-icon-refresh-right"></i> 刷新页面</li>
|
||||
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><i class="el-icon-close"></i> 关闭当前</li>
|
||||
<li @click="closeOthersTags"><i class="el-icon-circle-close"></i> 关闭其他</li>
|
||||
<li v-if="!isFirstView()" @click="closeLeftTags"><i class="el-icon-back"></i> 关闭左侧</li>
|
||||
<li v-if="!isLastView()" @click="closeRightTags"><i class="el-icon-right"></i> 关闭右侧</li>
|
||||
<li @click="closeAllTags(selectedTag)"><i class="el-icon-circle-close"></i> 全部关闭</li>
|
||||
<ul
|
||||
v-show="visible"
|
||||
:style="{ left: left + 'px', top: top + 'px' }"
|
||||
class="contextmenu"
|
||||
>
|
||||
<li @click="refreshSelectedTag(selectedTag)">
|
||||
<i class="el-icon-refresh-right"></i> 刷新页面
|
||||
</li>
|
||||
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">
|
||||
<i class="el-icon-close"></i> 关闭当前
|
||||
</li>
|
||||
<li @click="closeOthersTags">
|
||||
<i class="el-icon-circle-close"></i> 关闭其他
|
||||
</li>
|
||||
<li v-if="!isFirstView()" @click="closeLeftTags">
|
||||
<i class="el-icon-back"></i> 关闭左侧
|
||||
</li>
|
||||
<li v-if="!isLastView()" @click="closeRightTags">
|
||||
<i class="el-icon-right"></i> 关闭右侧
|
||||
</li>
|
||||
<li @click="closeAllTags(selectedTag)">
|
||||
<i class="el-icon-circle-close"></i> 全部关闭
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ScrollPane from './ScrollPane'
|
||||
import path from 'path'
|
||||
import ScrollPane from "./ScrollPane";
|
||||
import path from "path";
|
||||
|
||||
export default {
|
||||
components: { ScrollPane },
|
||||
|
@ -40,201 +64,207 @@ export default {
|
|||
top: 0,
|
||||
left: 0,
|
||||
selectedTag: {},
|
||||
affixTags: []
|
||||
}
|
||||
affixTags: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
visitedViews() {
|
||||
return this.$store.state.tagsView.visitedViews
|
||||
return this.$store.state.tagsView.visitedViews;
|
||||
},
|
||||
routes() {
|
||||
return this.$store.state.permission.routes
|
||||
return this.$store.state.permission.routes;
|
||||
},
|
||||
theme() {
|
||||
return this.$store.state.settings.theme;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
this.addTags()
|
||||
this.moveToCurrentTag()
|
||||
this.addTags();
|
||||
this.moveToCurrentTag();
|
||||
},
|
||||
visible(value) {
|
||||
if (value) {
|
||||
document.body.addEventListener('click', this.closeMenu)
|
||||
document.body.addEventListener("click", this.closeMenu);
|
||||
} else {
|
||||
document.body.removeEventListener('click', this.closeMenu)
|
||||
document.body.removeEventListener("click", this.closeMenu);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.initTags()
|
||||
this.addTags()
|
||||
this.initTags();
|
||||
this.addTags();
|
||||
},
|
||||
methods: {
|
||||
isActive(route) {
|
||||
return route.path === this.$route.path
|
||||
return route.path === this.$route.path;
|
||||
},
|
||||
activeStyle(tag) {
|
||||
if (!this.isActive(tag)) return {};
|
||||
return {
|
||||
"background-color": this.theme,
|
||||
"border-color": this.theme
|
||||
"border-color": this.theme,
|
||||
};
|
||||
},
|
||||
isAffix(tag) {
|
||||
return tag.meta && tag.meta.affix
|
||||
return tag.meta && tag.meta.affix;
|
||||
},
|
||||
isFirstView() {
|
||||
try {
|
||||
return this.selectedTag.fullPath === '/index' || this.selectedTag.fullPath === this.visitedViews[1].fullPath
|
||||
return (
|
||||
this.selectedTag.fullPath === "/index" ||
|
||||
this.selectedTag.fullPath === this.visitedViews[1].fullPath
|
||||
);
|
||||
} catch (err) {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
},
|
||||
isLastView() {
|
||||
try {
|
||||
return this.selectedTag.fullPath === this.visitedViews[this.visitedViews.length - 1].fullPath
|
||||
return (
|
||||
this.selectedTag.fullPath ===
|
||||
this.visitedViews[this.visitedViews.length - 1].fullPath
|
||||
);
|
||||
} catch (err) {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
},
|
||||
filterAffixTags(routes, basePath = '/') {
|
||||
let tags = []
|
||||
routes.forEach(route => {
|
||||
filterAffixTags(routes, basePath = "/") {
|
||||
let tags = [];
|
||||
routes.forEach((route) => {
|
||||
if (route.meta && route.meta.affix) {
|
||||
const tagPath = path.resolve(basePath, route.path)
|
||||
const tagPath = path.resolve(basePath, route.path);
|
||||
tags.push({
|
||||
fullPath: tagPath,
|
||||
path: tagPath,
|
||||
name: route.name,
|
||||
meta: { ...route.meta }
|
||||
})
|
||||
meta: { ...route.meta },
|
||||
});
|
||||
}
|
||||
if (route.children) {
|
||||
const tempTags = this.filterAffixTags(route.children, route.path)
|
||||
const tempTags = this.filterAffixTags(route.children, route.path);
|
||||
if (tempTags.length >= 1) {
|
||||
tags = [...tags, ...tempTags]
|
||||
tags = [...tags, ...tempTags];
|
||||
}
|
||||
}
|
||||
})
|
||||
return tags
|
||||
});
|
||||
return tags;
|
||||
},
|
||||
initTags() {
|
||||
const affixTags = this.affixTags = this.filterAffixTags(this.routes)
|
||||
const affixTags = (this.affixTags = this.filterAffixTags(this.routes));
|
||||
for (const tag of affixTags) {
|
||||
// Must have tag name
|
||||
if (tag.name) {
|
||||
this.$store.dispatch('tagsView/addVisitedView', tag)
|
||||
this.$store.dispatch("tagsView/addVisitedView", tag);
|
||||
}
|
||||
}
|
||||
},
|
||||
addTags() {
|
||||
const { name } = this.$route
|
||||
const { name } = this.$route;
|
||||
if (name) {
|
||||
this.$store.dispatch('tagsView/addView', this.$route)
|
||||
this.$store.dispatch("tagsView/addView", this.$route);
|
||||
if (this.$route.meta.link) {
|
||||
this.$store.dispatch('tagsView/addIframeView', this.$route)
|
||||
this.$store.dispatch("tagsView/addIframeView", this.$route);
|
||||
}
|
||||
}
|
||||
return false
|
||||
return false;
|
||||
},
|
||||
moveToCurrentTag() {
|
||||
const tags = this.$refs.tag
|
||||
const tags = this.$refs.tag;
|
||||
this.$nextTick(() => {
|
||||
for (const tag of tags) {
|
||||
if (tag.to.path === this.$route.path) {
|
||||
this.$refs.scrollPane.moveToTarget(tag)
|
||||
this.$refs.scrollPane.moveToTarget(tag);
|
||||
// when query is different then update
|
||||
if (tag.to.fullPath !== this.$route.fullPath) {
|
||||
this.$store.dispatch('tagsView/updateVisitedView', this.$route)
|
||||
this.$store.dispatch("tagsView/updateVisitedView", this.$route);
|
||||
}
|
||||
break
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
refreshSelectedTag(view) {
|
||||
this.$tab.refreshPage(view);
|
||||
if (this.$route.meta.link) {
|
||||
this.$store.dispatch('tagsView/delIframeView', this.$route)
|
||||
this.$store.dispatch("tagsView/delIframeView", this.$route);
|
||||
}
|
||||
},
|
||||
closeSelectedTag(view) {
|
||||
this.$tab.closePage(view).then(({ visitedViews }) => {
|
||||
if (this.isActive(view)) {
|
||||
this.toLastView(visitedViews, view)
|
||||
this.toLastView(visitedViews, view);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
closeRightTags() {
|
||||
this.$tab.closeRightPage(this.selectedTag).then(visitedViews => {
|
||||
if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) {
|
||||
this.toLastView(visitedViews)
|
||||
this.$tab.closeRightPage(this.selectedTag).then((visitedViews) => {
|
||||
if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {
|
||||
this.toLastView(visitedViews);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
closeLeftTags() {
|
||||
this.$tab.closeLeftPage(this.selectedTag).then(visitedViews => {
|
||||
if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) {
|
||||
this.toLastView(visitedViews)
|
||||
this.$tab.closeLeftPage(this.selectedTag).then((visitedViews) => {
|
||||
if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {
|
||||
this.toLastView(visitedViews);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
closeOthersTags() {
|
||||
this.$router.push(this.selectedTag.fullPath).catch(()=>{});
|
||||
this.$router.push(this.selectedTag.fullPath).catch(() => {});
|
||||
this.$tab.closeOtherPage(this.selectedTag).then(() => {
|
||||
this.moveToCurrentTag()
|
||||
})
|
||||
this.moveToCurrentTag();
|
||||
});
|
||||
},
|
||||
closeAllTags(view) {
|
||||
this.$tab.closeAllPage().then(({ visitedViews }) => {
|
||||
if (this.affixTags.some(tag => tag.path === this.$route.path)) {
|
||||
return
|
||||
if (this.affixTags.some((tag) => tag.path === this.$route.path)) {
|
||||
return;
|
||||
}
|
||||
this.toLastView(visitedViews, view)
|
||||
})
|
||||
this.toLastView(visitedViews, view);
|
||||
});
|
||||
},
|
||||
toLastView(visitedViews, view) {
|
||||
const latestView = visitedViews.slice(-1)[0]
|
||||
const latestView = visitedViews.slice(-1)[0];
|
||||
if (latestView) {
|
||||
this.$router.push(latestView.fullPath)
|
||||
this.$router.push(latestView.fullPath);
|
||||
} else {
|
||||
// now the default is to redirect to the home page if there is no tags-view,
|
||||
// you can adjust it according to your needs.
|
||||
if (view.name === 'Dashboard') {
|
||||
if (view.name === "Dashboard") {
|
||||
// to reload home page
|
||||
this.$router.replace({ path: '/redirect' + view.fullPath })
|
||||
this.$router.replace({ path: "/redirect" + view.fullPath });
|
||||
} else {
|
||||
this.$router.push('/')
|
||||
this.$router.push("/");
|
||||
}
|
||||
}
|
||||
},
|
||||
openMenu(tag, e) {
|
||||
const menuMinWidth = 105
|
||||
const offsetLeft = this.$el.getBoundingClientRect().left // container margin left
|
||||
const offsetWidth = this.$el.offsetWidth // container width
|
||||
const maxLeft = offsetWidth - menuMinWidth // left boundary
|
||||
const left = e.clientX - offsetLeft + 15 // 15: margin right
|
||||
const menuMinWidth = 105;
|
||||
const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
|
||||
const offsetWidth = this.$el.offsetWidth; // container width
|
||||
const maxLeft = offsetWidth - menuMinWidth; // left boundary
|
||||
const left = e.clientX - offsetLeft + 15; // 15: margin right
|
||||
|
||||
if (left > maxLeft) {
|
||||
this.left = maxLeft
|
||||
this.left = maxLeft;
|
||||
} else {
|
||||
this.left = left
|
||||
this.left = left;
|
||||
}
|
||||
|
||||
this.top = e.clientY
|
||||
this.visible = true
|
||||
this.selectedTag = tag
|
||||
this.top = e.clientY;
|
||||
this.visible = true;
|
||||
this.selectedTag = tag;
|
||||
},
|
||||
closeMenu() {
|
||||
this.visible = false
|
||||
this.visible = false;
|
||||
},
|
||||
handleScroll() {
|
||||
this.closeMenu()
|
||||
}
|
||||
}
|
||||
}
|
||||
this.closeMenu();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -243,7 +273,7 @@ export default {
|
|||
width: 100%;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #d8dce5;
|
||||
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
|
||||
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
|
||||
.tags-view-wrapper {
|
||||
.tags-view-item {
|
||||
display: inline-block;
|
||||
|
@ -269,7 +299,7 @@ export default {
|
|||
color: #fff;
|
||||
border-color: #42b983;
|
||||
&::before {
|
||||
content: '';
|
||||
content: "";
|
||||
background: #fff;
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
|
@ -292,7 +322,7 @@ export default {
|
|||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .3);
|
||||
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
|
||||
li {
|
||||
margin: 0;
|
||||
padding: 7px 16px;
|
||||
|
@ -315,10 +345,10 @@ export default {
|
|||
vertical-align: 2px;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
transition: all .3s cubic-bezier(.645, .045, .355, 1);
|
||||
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
transform-origin: 100% 50%;
|
||||
&:before {
|
||||
transform: scale(.6);
|
||||
transform: scale(0.6);
|
||||
display: inline-block;
|
||||
vertical-align: -3px;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2018-2024 ruoyi.vip All Rights Reserved.</span>
|
||||
<span>unissense.tech</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -37,15 +37,21 @@
|
|||
readonly
|
||||
:disabled="isEditing"
|
||||
@click.native="openProjectManagerSelect"
|
||||
/>
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
slot="append"
|
||||
icon="el-icon-user"
|
||||
></el-button
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目状态" prop="projectState">
|
||||
<el-form-item label="数据状态" prop="dataState" style="display: none">
|
||||
<el-select
|
||||
v-model="formData.projectState"
|
||||
v-model="formData.dataState"
|
||||
placeholder="根据时间自动生成"
|
||||
disabled
|
||||
class="full-width"
|
||||
|
@ -55,6 +61,20 @@
|
|||
<el-option label="已完成" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目状态" prop="projectState">
|
||||
<el-select
|
||||
v-model="formData.projectState"
|
||||
placeholder="请选择项目状态"
|
||||
class="full-width"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusList"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="预计人天" prop="budgetDate">
|
||||
|
@ -123,7 +143,7 @@
|
|||
:show-pagination="false"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
style="height: 100%;"
|
||||
style="height: 100%"
|
||||
>
|
||||
<template slot="userName" slot-scope="{ row }">
|
||||
<el-input
|
||||
|
@ -230,10 +250,9 @@
|
|||
/>
|
||||
|
||||
<SelectUser
|
||||
v-if="showProjectManagerSelect"
|
||||
:dialogVisible="showProjectManagerSelect"
|
||||
:multi-select="false"
|
||||
:selected-users="projectManagerSelectedUser"
|
||||
:currentSelectedUser="projectManagerSelectedUser"
|
||||
@confirm="handleProjectManagerConfirm"
|
||||
@close="closeProjectManagerSelect"
|
||||
/>
|
||||
|
@ -268,8 +287,10 @@ export default {
|
|||
endDate: "",
|
||||
budgetDate: 0,
|
||||
state: 0,
|
||||
dataState: 0,
|
||||
},
|
||||
postOptions: [],
|
||||
statusList: [],
|
||||
columns: [
|
||||
{ prop: "userName", label: "姓名" },
|
||||
{ prop: "post", label: "项目职位" },
|
||||
|
@ -287,8 +308,12 @@ export default {
|
|||
projectLeader: [
|
||||
{ required: true, message: "项目负责人为必填", trigger: "change" },
|
||||
],
|
||||
projectState: [
|
||||
{ required: true, message: "请选择项目状态", trigger: "change" },
|
||||
],
|
||||
startDate: [
|
||||
{ required: true, message: "开始日期为必填", trigger: "change" },
|
||||
{ validator: this.validateDates, trigger: "change" },
|
||||
],
|
||||
endDate: [
|
||||
{ required: true, message: "结束日期为必填", trigger: "change" },
|
||||
|
@ -296,7 +321,6 @@ export default {
|
|||
],
|
||||
budgetDate: [
|
||||
{ required: true, message: "预算天数为必填", trigger: "blur" },
|
||||
{ validator: this.validateDates, trigger: "change" },
|
||||
],
|
||||
},
|
||||
};
|
||||
|
@ -319,11 +343,11 @@ export default {
|
|||
|
||||
if (start && end) {
|
||||
if (now < start) {
|
||||
this.formData.projectState = "0"; // 未开始
|
||||
this.formData.dataState = "0"; // 未开始
|
||||
} else if (now >= start && now <= end) {
|
||||
this.formData.projectState = "1"; // 进行中
|
||||
this.formData.dataState = "1"; // 进行中
|
||||
} else {
|
||||
this.formData.projectState = "2"; // 已结束
|
||||
this.formData.dataState = "2"; // 已结束
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -351,10 +375,10 @@ export default {
|
|||
const projectDataToSave = {
|
||||
...this.formData,
|
||||
startDate: this.formData.startDate
|
||||
? new Date(this.formData.startDate+' 00:00:00').getTime()
|
||||
? new Date(this.formData.startDate + " 00:00:00").getTime()
|
||||
: null,
|
||||
endDate: this.formData.endDate
|
||||
? new Date(this.formData.endDate+' 23:59:59').getTime()
|
||||
? new Date(this.formData.endDate + " 23:59:59").getTime()
|
||||
: null,
|
||||
};
|
||||
|
||||
|
@ -384,7 +408,7 @@ export default {
|
|||
}
|
||||
} else {
|
||||
this.$modal.msgError("请检查表单填写是否正确");
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
// this.$modal.msgSuccess("操作成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -405,10 +429,10 @@ export default {
|
|||
isNew: true,
|
||||
userId: "",
|
||||
isEditing: true,
|
||||
index: this.tableData.length,
|
||||
index: this.tableData.length - 1,
|
||||
};
|
||||
this.currentEditingRow = newUser;
|
||||
this.tableData.push(newUser);
|
||||
this.tableData.unshift(newUser);
|
||||
},
|
||||
confirmAddUser(row) {
|
||||
if (!this.formData.projectId) {
|
||||
|
@ -439,13 +463,15 @@ export default {
|
|||
});
|
||||
},
|
||||
cancelAddUser(row) {
|
||||
const index = this.tableData.findIndex(
|
||||
(item) => item.userId === row.userId
|
||||
);
|
||||
if (index !== -1) {
|
||||
if (row.index != undefined) {
|
||||
let index = this.tableData.findIndex((item) => item.index == row.index);
|
||||
|
||||
this.tableData.splice(index, 1);
|
||||
} else {
|
||||
this.tableData.splice(row.index, 1);
|
||||
var index = this.tableData.findIndex(
|
||||
(item) => item.userId === row.userId
|
||||
);
|
||||
this.tableData.splice(index, 1);
|
||||
}
|
||||
},
|
||||
cancelUserEdit(row) {
|
||||
|
@ -457,6 +483,8 @@ export default {
|
|||
this.currentSelectedUser = row.userId
|
||||
? [{ userId: row.userId, userName: row.userName }]
|
||||
: [];
|
||||
console.log(111, this.currentSelectedUser);
|
||||
|
||||
this.showSelectUser = true;
|
||||
},
|
||||
handleUserConfirm(selectedUsers) {
|
||||
|
@ -478,8 +506,8 @@ export default {
|
|||
this.projectManagerSelectedUser = this.formData.projectLeader
|
||||
? [
|
||||
{
|
||||
id: this.formData.projectLeaderId,
|
||||
name: this.formData.projectLeader,
|
||||
userId: this.formData.projectLeader,
|
||||
nickName: this.formData.projectLeaderName,
|
||||
},
|
||||
]
|
||||
: [];
|
||||
|
@ -566,7 +594,9 @@ export default {
|
|||
},
|
||||
async getDictData() {
|
||||
const res = await systemApi.getDictData("business_positions");
|
||||
const res2 = await systemApi.getDictData("business_projectstate");
|
||||
this.postOptions = res.data;
|
||||
this.statusList = res2.data;
|
||||
},
|
||||
async getProjectUser() {
|
||||
const res = await projectApi.getProjectUser(this.formData.projectId);
|
||||
|
@ -608,6 +638,7 @@ export default {
|
|||
} else {
|
||||
this.updateProjectState(); // 对于新项目,也要初始化状态
|
||||
}
|
||||
// 获取项目状态数据字典
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -662,7 +693,9 @@ export default {
|
|||
height: 42px; /* 调高输入框高度 */
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.custom-form ::v-deep .el-input__inner {
|
||||
height: 100%;
|
||||
}
|
||||
.custom-form ::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
|
@ -16,14 +16,17 @@
|
|||
placeholder="负责人"
|
||||
readonly
|
||||
@click.native="openUserSelectDialog"
|
||||
/>
|
||||
><el-button slot="append" icon="el-icon-user"></el-button
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目状态" class="form-item">
|
||||
<el-select v-model="searchForm.projectState" placeholder="项目状态">
|
||||
<el-option label="全部" value="" />
|
||||
<el-option label="未启动" value="0" />
|
||||
<el-option label="进行中" value="1" />
|
||||
<el-option label="已完成" value="2" />
|
||||
<el-option
|
||||
v-for="item in statusList"
|
||||
:key="item.dictValue"
|
||||
:label="item.dictLabel"
|
||||
:value="item.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="search-buttons">
|
||||
|
@ -51,7 +54,7 @@
|
|||
:show-index="true"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
tableHeight="80%"
|
||||
tableHeight="495px"
|
||||
>
|
||||
<template slot="operation" slot-scope="{ row }">
|
||||
<div class="operation-buttons">
|
||||
|
@ -88,7 +91,7 @@
|
|||
<script>
|
||||
import CustomTable from "@/components/CustomTable.vue";
|
||||
import SelectUser from "@/components/SelectUser.vue";
|
||||
import { projectApi } from "@/utils/api";
|
||||
import { projectApi, systemApi } from "@/utils/api";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -104,47 +107,61 @@ export default {
|
|||
projectState: "",
|
||||
},
|
||||
columns: [
|
||||
{ prop: "projectName", label: "项目名称",width:300, },
|
||||
{ prop: "projectCode", label: "项目编号",width:200, },
|
||||
{ prop: "projectName", label: "项目名称", width: 300 },
|
||||
{ prop: "projectCode", label: "项目编号", width: 200 },
|
||||
{ prop: "projectLeaderName", label: "负责人" },
|
||||
{ prop: "budgetDate", label: "预计工时(天)" },
|
||||
{
|
||||
prop: "startDate",
|
||||
label: "开始时间",
|
||||
type: "status",
|
||||
callback: (data) => data.split(" ")[0],
|
||||
callback: (data) => data?.split(" ")[0],
|
||||
},
|
||||
{
|
||||
prop: "endDate",
|
||||
label: "结束时间",
|
||||
type: "status",
|
||||
callback: (data) => data.split(" ")[0],
|
||||
callback: (data) => data?.split(" ")[0],
|
||||
},
|
||||
{
|
||||
prop: "projectState",
|
||||
label: "项目状态",
|
||||
type: "status",
|
||||
callback: (value) => {
|
||||
let status = "未知";
|
||||
let color = "";
|
||||
switch (value) {
|
||||
case "0":
|
||||
status = "未启动";
|
||||
color = "#909399"; // 灰色
|
||||
break;
|
||||
case "1":
|
||||
status = "进行中";
|
||||
color = "#409EFF"; // 蓝色
|
||||
break;
|
||||
case "2":
|
||||
status = "已完成";
|
||||
color = "#67C23A"; // 绿色
|
||||
break;
|
||||
}
|
||||
let status = this.statusList.find(
|
||||
(ele) => ele.dictValue == value
|
||||
)?.dictLabel;
|
||||
let color = "#333";
|
||||
// switch (status) {
|
||||
// case "待启动":
|
||||
// color = "#fa721d"; // 橙色
|
||||
// break;
|
||||
// case "已提需求-待开发":
|
||||
// color = "#dd242a"; // 红色
|
||||
// break;
|
||||
// case "已提需求-开发中":
|
||||
// color = "#1686d8"; // 绿色
|
||||
// break;
|
||||
// case "已提需求-已完成":
|
||||
// color = "#5cb85c"; // 红色
|
||||
// break;
|
||||
// case "开发完成-待验收":
|
||||
// color = "#f7c731"; // 黄色
|
||||
// break;
|
||||
// case "开发完成-已验收":
|
||||
// color = "#8C33FF"; // 蓝色
|
||||
// break;
|
||||
// case "开发完成-已计收":
|
||||
// color = "#08fb9e"; // 绿色
|
||||
// break;
|
||||
// default:
|
||||
// color = "#000"; // 默认白色
|
||||
// break;
|
||||
// }
|
||||
return `<span style="color: ${color}">${status}</span>`;
|
||||
},
|
||||
},
|
||||
{ prop: "teamNum", label: "参与项目人数" },
|
||||
{ prop: "teamNum", label: "参与项目人数",width:100 },
|
||||
{ prop: "createByName", label: "项目创建人" },
|
||||
{
|
||||
prop: "operation",
|
||||
|
@ -160,11 +177,11 @@ export default {
|
|||
currentSelectedUser: [],
|
||||
pageNum: 1, // 当前页码
|
||||
pageSize: 10, // 每页条数
|
||||
statusList: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onSearch() {
|
||||
console.log("Search with:", this.searchForm);
|
||||
this.fetchProjectList();
|
||||
},
|
||||
onReset() {
|
||||
|
@ -228,8 +245,13 @@ export default {
|
|||
handleUserClose() {
|
||||
this.userSelectDialogVisible = false;
|
||||
},
|
||||
async getDictData() {
|
||||
const res = await systemApi.getDictData("business_projectstate");
|
||||
this.statusList = res.data;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getDictData();
|
||||
this.fetchProjectList();
|
||||
},
|
||||
};
|
||||
|
@ -288,8 +310,8 @@ export default {
|
|||
}
|
||||
|
||||
::v-deep .operation-column {
|
||||
background-color: #fff;
|
||||
box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
|
||||
background-color: #ffffff;
|
||||
box-shadow: -2px 0 5px rgba(241, 112, 6, 0.1);
|
||||
}
|
||||
|
||||
.el-button.is-text {
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
:showSummary="true"
|
||||
:summaryMethod="getFixedColumnsSummaries"
|
||||
tableHeight="600"
|
||||
:border="true"
|
||||
></CustomTable>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -37,10 +38,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { projectBank } from "@/utils/api";
|
||||
import { projectBank, systemApi } from "@/utils/api";
|
||||
import CustomTable from "@/components/CustomTable.vue";
|
||||
|
||||
export default {
|
||||
name: "ProjectProgress",
|
||||
components: {
|
||||
CustomTable,
|
||||
},
|
||||
|
@ -50,6 +52,7 @@ export default {
|
|||
dateRange: this.getDefaultDateRange(),
|
||||
fixedColumns: [],
|
||||
executionData: [],
|
||||
statusList: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -117,6 +120,10 @@ export default {
|
|||
},
|
||||
});
|
||||
},
|
||||
async getDictData() {
|
||||
const res = await systemApi.getDictData("business_projectstate");
|
||||
this.statusList = res.data;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
timeRange: {
|
||||
|
@ -171,24 +178,38 @@ export default {
|
|||
label: "项目状态",
|
||||
type: "button",
|
||||
fixed: "left",
|
||||
width: 100,
|
||||
width: 150,
|
||||
callback: (value) => {
|
||||
let status = "未知";
|
||||
let color = "";
|
||||
switch (value) {
|
||||
case "0":
|
||||
status = "未启动";
|
||||
color = "#909399"; // 灰色
|
||||
break;
|
||||
case "1":
|
||||
status = "进行中";
|
||||
color = "#409EFF"; // 蓝色
|
||||
break;
|
||||
case "2":
|
||||
status = "已完成";
|
||||
color = "#67C23A"; // 绿色
|
||||
break;
|
||||
}
|
||||
let status = this.statusList.find(
|
||||
(ele) => ele.dictValue == value
|
||||
)?.dictLabel;
|
||||
let color = "#333";
|
||||
// switch (status) {
|
||||
// case "待启动":
|
||||
// color = "#fa721d"; // 橙色
|
||||
// break;
|
||||
// case "已提需求-待开发":
|
||||
// color = "#dd242a"; // 红色
|
||||
// break;
|
||||
// case "已提需求-开发中":
|
||||
// color = "#1686d8"; // 绿色
|
||||
// break;
|
||||
// case "已提需求-已完成":
|
||||
// color = "#5cb85c"; // 红色
|
||||
// break;
|
||||
// case "开发完成-待验收":
|
||||
// color = "#f7c731"; // 黄色
|
||||
// break;
|
||||
// case "开发完成-已验收":
|
||||
// color = "#8C33FF"; // 蓝色
|
||||
// break;
|
||||
// case "开发完成-已计收":
|
||||
// color = "#08fb9e"; // 绿色
|
||||
// break;
|
||||
// default:
|
||||
// color = "#000"; // 默认白色
|
||||
// break;
|
||||
// }
|
||||
return `<span style="color: ${color}">${status}</span>`;
|
||||
},
|
||||
},
|
||||
|
@ -210,6 +231,7 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getDictData();
|
||||
this.getProjectProgress();
|
||||
},
|
||||
beforeDestroy() {},
|
||||
|
@ -245,7 +267,7 @@ export default {
|
|||
text-align: center;
|
||||
}
|
||||
::v-deep .el-table__footer td {
|
||||
background-color: #c0c4cc !important;
|
||||
background-color: #e0e1e3 !important;
|
||||
font-weight: bold;
|
||||
text-align: center; /* 确保合计行内容居中 */
|
||||
}
|
||||
|
@ -322,8 +344,6 @@ export default {
|
|||
}
|
||||
::v-deep .el-table__fixed {
|
||||
box-shadow: 5px 20px 20px rgba(7, 7, 7, 0.5) !important;
|
||||
|
||||
|
||||
}
|
||||
.shadowBox {
|
||||
// position: absolute;
|
||||
|
@ -333,4 +353,7 @@ export default {
|
|||
// left: 450px;
|
||||
// z-index: 100;
|
||||
}
|
||||
::v-deep .el-table__footer td {
|
||||
border: none !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -60,6 +60,8 @@
|
|||
:columns="scrollableColumns"
|
||||
:tableData="executionData"
|
||||
:showPagination="false"
|
||||
:border="true"
|
||||
tableHeight="600"
|
||||
></CustomTable>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -70,6 +72,7 @@ import CustomTable from "@/components/CustomTable.vue";
|
|||
import { projectBank, projectApi } from "@/utils/api";
|
||||
|
||||
export default {
|
||||
name: "ProjectUser",
|
||||
components: {
|
||||
CustomTable,
|
||||
},
|
||||
|
@ -146,7 +149,6 @@ export default {
|
|||
newEndDate.setMonth(startDate.getMonth() + 3);
|
||||
this.dateRange[1] = newEndDate.toISOString().split("T")[0]; // 格式化为 YYYY-MM-DD
|
||||
}
|
||||
|
||||
},
|
||||
async handleProjectChange(projectId, time) {
|
||||
const res = await projectApi.getProjectDetail(projectId);
|
||||
|
@ -165,8 +167,8 @@ export default {
|
|||
endDate: this.dateRange[1] + " 23:59:59",
|
||||
projectId: this.projectInfo.projectId,
|
||||
});
|
||||
console.log(123,this.dateRange);
|
||||
|
||||
console.log(123, this.dateRange);
|
||||
|
||||
const start = new Date(this.timeRange[0]);
|
||||
const end = new Date(this.timeRange[1]);
|
||||
let index = 0;
|
||||
|
@ -180,7 +182,11 @@ export default {
|
|||
goToDetail(row) {
|
||||
this.$router.push({
|
||||
path: "/",
|
||||
query: { userId: row.userId, projectId: this.projectInfo.projectId,nickName:row.userName },
|
||||
query: {
|
||||
userId: row.userId,
|
||||
projectId: this.projectInfo.projectId,
|
||||
nickName: row.userName,
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
|
@ -366,4 +372,15 @@ export default {
|
|||
width: 100px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-table__body{
|
||||
height: 100%;
|
||||
}
|
||||
::v-deep td.el-table__cell{
|
||||
border-bottom: none;
|
||||
border-top: none;
|
||||
vertical-align: top;
|
||||
}
|
||||
::v-deep tr.el-table__row.current-row .el-table__cell {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
placeholder="请选择用户"
|
||||
readonly
|
||||
@click.native="openUserSelectDialog"
|
||||
suffix-icon="el-icon-user"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="date-range-container">
|
||||
|
@ -34,7 +35,9 @@
|
|||
:showPagination="false"
|
||||
:showSummary="true"
|
||||
:summaryMethod="getFixedColumnsSummaries"
|
||||
:tableHeight="600"
|
||||
tableHeight="600"
|
||||
:border="true"
|
||||
|
||||
></CustomTable>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -55,6 +58,7 @@ import SelectUser from "@/components/SelectUser.vue";
|
|||
import { projectBank } from "@/utils/api";
|
||||
|
||||
export default {
|
||||
name: "UserProject",
|
||||
components: {
|
||||
CustomTable,
|
||||
SelectUser,
|
||||
|
@ -229,7 +233,7 @@ export default {
|
|||
}
|
||||
.selectBox {
|
||||
width: 200px;
|
||||
margin-left: 35px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
.selectBox span {
|
||||
width: 120px;
|
||||
|
@ -286,7 +290,7 @@ export default {
|
|||
}
|
||||
/* 调整合计行的样式 */
|
||||
::v-deep .el-table__footer td {
|
||||
background-color: #c0c4cc !important;
|
||||
background-color: #e0e1e3 !important;
|
||||
|
||||
font-weight: bold;
|
||||
color: #606266;
|
||||
|
@ -312,4 +316,7 @@ export default {
|
|||
bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
::v-deep .el-table__footer td{
|
||||
border: none !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-register-footer">
|
||||
<span>Copyright © 2018-2024 ruoyi.vip All Rights Reserved.</span>
|
||||
<span>unissense.tech</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -419,7 +419,6 @@ export default {
|
|||
async fetchUserProjects() {
|
||||
try {
|
||||
const response = await workLogApi.userProject(this.projectInfo.userId);
|
||||
console.log(12333, this.projectList);
|
||||
this.projectList = response.data;
|
||||
if (this.projectList.length) {
|
||||
let arr = [];
|
||||
|
@ -552,7 +551,7 @@ export default {
|
|||
font-size: 20px;
|
||||
}
|
||||
.project-info-calendar .calendar-view ::v-deep .el-calendar-day {
|
||||
height: 85px; /* 增加日期单元格高度(原高度 + 5px) */
|
||||
height: 70px; /* 增加日期单元格高度(原高度 + 5px) */
|
||||
// padding-top: 5px;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
|
@ -568,7 +567,7 @@ border: none;
|
|||
cursor: pointer;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
line-height: 65px;
|
||||
line-height: 50px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue