项目完善,bug修改
parent
7c2b45327f
commit
d365e61242
|
@ -1,5 +1,5 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = PMS:新光线平台
|
VUE_APP_TITLE = 新光线平台
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = PMS:新光线平台
|
VUE_APP_TITLE = 新光线平台
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = PMS:新光线平台
|
VUE_APP_TITLE = 新光线平台
|
||||||
|
|
||||||
NODE_ENV = production
|
NODE_ENV = production
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "ruoyi",
|
"name": "ruoyi",
|
||||||
"version": "3.8.8",
|
"version": "3.8.8",
|
||||||
"description": "PMS:新光线平台",
|
"description": "新光线平台",
|
||||||
"author": "PMS:新光线平台",
|
"author": "新光线平台",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve",
|
"dev": "vue-cli-service serve",
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 12 KiB |
|
@ -247,13 +247,6 @@ body {
|
||||||
.search-item.short {
|
.search-item.short {
|
||||||
width: 24%;
|
width: 24%;
|
||||||
}
|
}
|
||||||
.table-container {
|
|
||||||
flex: 1 1 auto;
|
|
||||||
height: 0;
|
|
||||||
.el-scrollbar {
|
|
||||||
min-height: 50px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -292,30 +285,6 @@ body {
|
||||||
background: rgba(0, 0, 0, 0);
|
background: rgba(0, 0, 0, 0);
|
||||||
border-radius: 0.1rem;
|
border-radius: 0.1rem;
|
||||||
}
|
}
|
||||||
// 全局修改table表体内cell文字大小
|
|
||||||
.el-table__body {
|
|
||||||
.cell {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 全局表头不换行
|
|
||||||
.el-table th > .cell {
|
|
||||||
display: inline-block;
|
|
||||||
white-space: nowrap;
|
|
||||||
word-break: keep-all;
|
|
||||||
text-overflow: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 表格空数据居中显示
|
|
||||||
:deep(.el-table__empty-block) {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
// .el-table__empty-text {
|
|
||||||
// color: #ffffff;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
:deep(.el-form-item__content) {
|
:deep(.el-form-item__content) {
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="custom-table" ref="tableContainer">
|
<div class="custom-table" ref="tableContainer">
|
||||||
|
{{ computedTableHeight }}
|
||||||
<el-table
|
<el-table
|
||||||
ref="elTableRef"
|
ref="elTableRef"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
:max-height="computedTableHeight"
|
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
:border="border"
|
:border="border"
|
||||||
:highlight-current-row="highligt"
|
:highlight-current-row="highligt"
|
||||||
@row-click="rowClick"
|
@row-click="rowClick"
|
||||||
:row-key="rowKey"
|
:row-key="rowKey"
|
||||||
:maxHeight="maxHeight"
|
:height="tableHeight"
|
||||||
>
|
>
|
||||||
<el-table-column v-if="showSelection" type="selection" width="55" />
|
<el-table-column v-if="showSelection" type="selection" width="55" />
|
||||||
<el-table-column v-if="showIndex" type="index" width="50" label="序号" />
|
<el-table-column v-if="showIndex" type="index" width="50" label="序号" />
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<template v-if="column.type === 'multiButton'">
|
<template v-if="column.type === 'multiButton'">
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<el-button
|
<el-button
|
||||||
v-for="(data,index) in scope.row[column.prop]"
|
v-for="(data, index) in scope.row[column.prop]"
|
||||||
:key="index"
|
:key="index"
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -142,6 +142,10 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "id",
|
default: "id",
|
||||||
},
|
},
|
||||||
|
tableHeight: {
|
||||||
|
type: String,
|
||||||
|
default: "100%",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -165,21 +169,6 @@ export default {
|
||||||
this.currentPage = val;
|
this.currentPage = val;
|
||||||
this.$emit("current-change", val);
|
this.$emit("current-change", val);
|
||||||
},
|
},
|
||||||
updateTableHeight() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (this.tableContainer) {
|
|
||||||
const parentElement = this.tableContainer.parentElement;
|
|
||||||
const parentHeight = parentElement.clientHeight;
|
|
||||||
const tableTop =
|
|
||||||
this.tableContainer.getBoundingClientRect().top -
|
|
||||||
parentElement.getBoundingClientRect().top;
|
|
||||||
const paginationHeight = this.showPagination
|
|
||||||
? this.paginationContainer.offsetHeight + 30
|
|
||||||
: 0; // 加上 margin-top
|
|
||||||
this.computedTableHeight = parentHeight - tableTop - paginationHeight;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
setCurrentRow(row) {
|
setCurrentRow(row) {
|
||||||
this.$refs.elTableRef.setCurrentRow(row);
|
this.$refs.elTableRef.setCurrentRow(row);
|
||||||
},
|
},
|
||||||
|
@ -190,13 +179,13 @@ export default {
|
||||||
this.$refs.elTableRef?.toggleRowSelection(row, selected);
|
this.$refs.elTableRef?.toggleRowSelection(row, selected);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
updated() {
|
||||||
this.updateTableHeight();
|
if (this.$refs.elTableRef && this.$refs.elTableRef.doLayout) {
|
||||||
window.addEventListener("resize", this.updateTableHeight);
|
this.$refs.elTableRef.doLayout();
|
||||||
},
|
}
|
||||||
beforeDestroy() {
|
|
||||||
window.removeEventListener("resize", this.updateTableHeight);
|
|
||||||
},
|
},
|
||||||
|
mounted() {},
|
||||||
|
beforeDestroy() {},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -218,29 +207,36 @@ export default {
|
||||||
::v-deep .el-table {
|
::v-deep .el-table {
|
||||||
--el-table-text-align: center;
|
--el-table-text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
flex: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-table th {
|
::v-deep .el-table th {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-table .cell {
|
::v-deep .el-table .cell {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 如果操作列需要特殊处理,可以添加以下样式 */
|
/* 如果操作列需要特殊处理,可以添加以下样式 */
|
||||||
::v-deep .operation-column .cell {
|
::v-deep .operation-column .cell {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
::v-deep .el-table__inner-wrapper::before {
|
::v-deep .el-table__inner-wrapper::before {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
::v-deep .el-table-column--selection {
|
::v-deep .el-table-column--selection {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.button-group ::v-deep .el-button {
|
.button-group ::v-deep .el-button {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-table__fixed {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
::v-deep .el-table {
|
||||||
|
max-height: 99%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -205,4 +205,7 @@ export default {
|
||||||
.dialog-footer .el-button:first-child {
|
.dialog-footer .el-button:first-child {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-table {
|
||||||
|
max-height:360px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -10,20 +10,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import iframeToggle from "./IframeToggle/index"
|
import iframeToggle from "./IframeToggle/index";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppMain',
|
name: "AppMain",
|
||||||
components: { iframeToggle },
|
components: { iframeToggle },
|
||||||
computed: {
|
computed: {
|
||||||
cachedViews() {
|
cachedViews() {
|
||||||
return this.$store.state.tagsView.cachedViews
|
return this.$store.state.tagsView.cachedViews;
|
||||||
},
|
},
|
||||||
key() {
|
key() {
|
||||||
return this.$route.path
|
return this.$route.path;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -38,11 +38,14 @@ export default {
|
||||||
.fixed-header + .app-main {
|
.fixed-header + .app-main {
|
||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-table {
|
||||||
|
max-height: calc(100vh - 350px);
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
.hasTagsView {
|
.hasTagsView {
|
||||||
.app-main {
|
.app-main {
|
||||||
/* 84 = navbar + tags-view = 50 + 34 */
|
/* 84 = navbar + tags-view = 50 + 34 */
|
||||||
min-height: calc(100vh - 84px);
|
min-height: calc(100vh - 100px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-header + .app-main {
|
.fixed-header + .app-main {
|
||||||
|
@ -60,8 +63,8 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 6px;
|
width: 15px;
|
||||||
height: 6px;
|
height: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
|
@ -70,6 +73,6 @@ export default {
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
background-color: #c0c0c0;
|
background-color: #c0c0c0;
|
||||||
border-radius: 3px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -26,15 +26,18 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||||
<div class="avatar-wrapper">
|
<div class="avatar-wrapper df aic">
|
||||||
|
<span>
|
||||||
|
{{ $store.state.user.nickName }}
|
||||||
|
</span>
|
||||||
<img :src="avatar" class="user-avatar">
|
<img :src="avatar" class="user-avatar">
|
||||||
<i class="el-icon-caret-bottom" />
|
<i class="el-icon-caret-bottom" />
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<!-- <router-link to="/user/profile">
|
<router-link to="/user/profile">
|
||||||
<el-dropdown-item>个人中心</el-dropdown-item>
|
<el-dropdown-item>个人中心</el-dropdown-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
<el-dropdown-item @click.native="setting = true">
|
<!--<el-dropdown-item @click.native="setting = true">
|
||||||
<span>布局设置</span>
|
<span>布局设置</span>
|
||||||
</el-dropdown-item> -->
|
</el-dropdown-item> -->
|
||||||
<el-dropdown-item divided @click.native="logout">
|
<el-dropdown-item divided @click.native="logout">
|
||||||
|
@ -72,7 +75,7 @@ export default {
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
'sidebar',
|
'sidebar',
|
||||||
'avatar',
|
'avatar',
|
||||||
'device'
|
'device',
|
||||||
]),
|
]),
|
||||||
setting: {
|
setting: {
|
||||||
get() {
|
get() {
|
||||||
|
@ -112,7 +115,7 @@ export default {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.navbar {
|
.navbar {
|
||||||
height: 50px;
|
height: 56px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
@ -178,6 +181,7 @@ export default {
|
||||||
.avatar-wrapper {
|
.avatar-wrapper {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
gap:10px;
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -74,20 +74,20 @@ export const constantRoutes = [
|
||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// path: '/user',
|
path: '/user',
|
||||||
// component: Layout,
|
component: Layout,
|
||||||
// hidden: true,
|
hidden: true,
|
||||||
// redirect: 'noredirect',
|
redirect: 'noredirect',
|
||||||
// children: [
|
children: [
|
||||||
// {
|
{
|
||||||
// path: 'profile',
|
path: 'profile',
|
||||||
// component: () => import('@/views/system/user/profile/index'),
|
component: () => import('@/views/system/user/profile/index'),
|
||||||
// name: 'Profile',
|
name: 'Profile',
|
||||||
// meta: { title: '个人中心', icon: 'user' }
|
meta: { title: '个人中心', icon: 'user' }
|
||||||
// }
|
}
|
||||||
// ]
|
]
|
||||||
// }
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
// 动态路由,基于用户权限动态去加载
|
// 动态路由,基于用户权限动态去加载
|
||||||
|
|
|
@ -46,6 +46,12 @@ export const projectApi = {
|
||||||
url: `/business/project/team/${id}`,
|
url: `/business/project/team/${id}`,
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
}),
|
}),
|
||||||
|
projectHasLogData: (data) => request({
|
||||||
|
url: `/business/project/updateCheck`,
|
||||||
|
method: 'POST',
|
||||||
|
data: data,
|
||||||
|
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
// 工作日志
|
// 工作日志
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
:rules="loginRules"
|
:rules="loginRules"
|
||||||
class="login-form"
|
class="login-form"
|
||||||
>
|
>
|
||||||
<h3 class="title">PMS:新光线平台</h3>
|
<h3 class="title">新光线平台</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
|
@ -96,8 +96,8 @@ export default {
|
||||||
return {
|
return {
|
||||||
codeUrl: "",
|
codeUrl: "",
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "admin",
|
username: "",
|
||||||
password: "admin123",
|
password: "",
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
code: "",
|
code: "",
|
||||||
uuid: "",
|
uuid: "",
|
||||||
|
|
|
@ -114,105 +114,113 @@
|
||||||
>新增成员</el-button
|
>新增成员</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="f1">
|
||||||
<CustomTable
|
<CustomTable
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:show-selection="false"
|
:show-selection="false"
|
||||||
:show-index="true"
|
:show-index="true"
|
||||||
:show-pagination="false"
|
:show-pagination="false"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
>
|
style="height: 100%;"
|
||||||
<template slot="userName" slot-scope="{ row }">
|
>
|
||||||
<el-input
|
<template slot="userName" slot-scope="{ row }">
|
||||||
v-if="row.isNew"
|
<el-input
|
||||||
v-model="row.userName"
|
v-if="row.isNew"
|
||||||
placeholder="选择人员"
|
v-model="row.userName"
|
||||||
readonly
|
placeholder="选择人员"
|
||||||
@click.native="openSelectUser(row)"
|
readonly
|
||||||
/>
|
@click.native="openSelectUser(row)"
|
||||||
<span v-else>{{ row.userName }}</span>
|
|
||||||
</template>
|
|
||||||
<template slot="post" slot-scope="{ row }">
|
|
||||||
<el-select
|
|
||||||
v-if="
|
|
||||||
(row.isEditing === true && row.teamId == row.teamId) || row.isNew
|
|
||||||
"
|
|
||||||
v-model="row.postId"
|
|
||||||
placeholder="请选择职位"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="post in postOptions"
|
|
||||||
:key="post.dictValue"
|
|
||||||
:label="post.dictLabel"
|
|
||||||
:value="post.dictValue"
|
|
||||||
/>
|
/>
|
||||||
</el-select>
|
<span v-else>{{ row.userName }}</span>
|
||||||
<span v-else>{{
|
</template>
|
||||||
postOptions.find((post) => post.dictValue === row.postId)
|
<template slot="post" slot-scope="{ row }">
|
||||||
? postOptions.find((post) => post.dictValue === row.postId)
|
<el-select
|
||||||
.dictLabel
|
v-if="
|
||||||
: ""
|
(row.isEditing === true && row.teamId == row.teamId) ||
|
||||||
}}</span>
|
row.isNew
|
||||||
</template>
|
"
|
||||||
<template slot="operation" slot-scope="{ row }">
|
v-model="row.postId"
|
||||||
<div class="operation-buttons">
|
placeholder="请选择职位"
|
||||||
<template v-if="row.isNew">
|
>
|
||||||
<el-button
|
<el-option
|
||||||
text
|
v-for="post in postOptions"
|
||||||
type="text"
|
:key="post.dictValue"
|
||||||
size="mini"
|
:label="post.dictLabel"
|
||||||
@click="confirmAddUser(row)"
|
:value="post.dictValue"
|
||||||
>确认</el-button
|
/>
|
||||||
>
|
</el-select>
|
||||||
<el-button
|
<span v-else>{{
|
||||||
text
|
postOptions.find((post) => post.dictValue === row.postId)
|
||||||
type="text"
|
? postOptions.find((post) => post.dictValue === row.postId)
|
||||||
size="mini"
|
.dictLabel
|
||||||
@click="cancelAddUser(row)"
|
: ""
|
||||||
>取消</el-button
|
}}</span>
|
||||||
>
|
</template>
|
||||||
</template>
|
<template slot="operation" slot-scope="{ row }">
|
||||||
<template v-else-if="row.isEditing && row.teamId == row.teamId">
|
<div class="operation-buttons">
|
||||||
<el-button text type="text" size="mini" @click="saveUserEdit(row)"
|
<template v-if="row.isNew">
|
||||||
>保存</el-button
|
<el-button
|
||||||
>
|
text
|
||||||
<el-button
|
type="text"
|
||||||
text
|
size="mini"
|
||||||
type="text"
|
@click="confirmAddUser(row)"
|
||||||
size="mini"
|
>确认</el-button
|
||||||
@click="cancelUserEdit(row)"
|
>
|
||||||
>取消</el-button
|
<el-button
|
||||||
>
|
text
|
||||||
</template>
|
type="text"
|
||||||
<template v-else>
|
size="mini"
|
||||||
<el-button
|
@click="cancelAddUser(row)"
|
||||||
type="text"
|
>取消</el-button
|
||||||
size="mini"
|
>
|
||||||
v-hasPermi="['project:detail:editUser']"
|
</template>
|
||||||
@click="editUser(row)"
|
<template v-else-if="row.isEditing && row.teamId == row.teamId">
|
||||||
>编辑</el-button
|
<el-button
|
||||||
>
|
text
|
||||||
<el-button
|
type="text"
|
||||||
type="text"
|
size="mini"
|
||||||
size="mini"
|
@click="saveUserEdit(row)"
|
||||||
v-hasPermi="['project:detail:workLog']"
|
>保存</el-button
|
||||||
@click="showTimesheet(row)"
|
>
|
||||||
>工作日志</el-button
|
<el-button
|
||||||
>
|
text
|
||||||
<el-button
|
type="text"
|
||||||
type="text"
|
size="mini"
|
||||||
size="mini"
|
@click="cancelUserEdit(row)"
|
||||||
v-hasPermi="['project:detail:deleteUser']"
|
>取消</el-button
|
||||||
@click="confirmDelete(row)"
|
>
|
||||||
>删除</el-button
|
</template>
|
||||||
>
|
<template v-else>
|
||||||
</template>
|
<el-button
|
||||||
</div>
|
type="text"
|
||||||
</template>
|
size="mini"
|
||||||
</CustomTable>
|
v-hasPermi="['project:detail:editUser']"
|
||||||
|
@click="editUser(row)"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
v-hasPermi="['project:detail:workLog']"
|
||||||
|
@click="showTimesheet(row)"
|
||||||
|
>工作日志</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
v-hasPermi="['project:detail:deleteUser']"
|
||||||
|
@click="confirmDelete(row)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</CustomTable>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SelectUser
|
<SelectUser
|
||||||
:dialogVisible="showSelectUser"
|
:dialogVisible="showSelectUser"
|
||||||
:multi-select="false"
|
:multi-select="false"
|
||||||
|
@ -320,8 +328,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateIsEdit() {
|
updateIsEdit() {
|
||||||
if (this.formData.projectId) this.isEditing = true;
|
// if (this.formData.projectId) this.isEditing = true;
|
||||||
else this.isEditing = false;
|
// else this.isEditing = false;
|
||||||
},
|
},
|
||||||
validateDates(rule, value, callback) {
|
validateDates(rule, value, callback) {
|
||||||
if (this.formData.startDate && this.formData.endDate) {
|
if (this.formData.startDate && this.formData.endDate) {
|
||||||
|
@ -338,28 +346,45 @@ export default {
|
||||||
},
|
},
|
||||||
saveProject() {
|
saveProject() {
|
||||||
if (!this.$refs.formRef) return;
|
if (!this.$refs.formRef) return;
|
||||||
|
|
||||||
this.$refs.formRef.validate(async (valid) => {
|
this.$refs.formRef.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const projectDataToSave = {
|
const projectDataToSave = {
|
||||||
...this.formData,
|
...this.formData,
|
||||||
startDate: this.formData.startDate
|
startDate: this.formData.startDate
|
||||||
? new Date(this.formData.startDate).getTime()
|
? new Date(this.formData.startDate+' 00:00:00').getTime()
|
||||||
: null,
|
: null,
|
||||||
endDate: this.formData.endDate
|
endDate: this.formData.endDate
|
||||||
? new Date(this.formData.endDate).getTime()
|
? new Date(this.formData.endDate+' 23:59:59').getTime()
|
||||||
: null,
|
: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!this.formData.projectId) {
|
if (!this.formData.projectId) {
|
||||||
const res = await projectApi.addProject(projectDataToSave);
|
const res = await projectApi.addProject(projectDataToSave);
|
||||||
this.formData.projectId = res.data.projectId;
|
this.formData.projectId = res.data.projectId;
|
||||||
this.formData.projectCode = res.data.projectCode;
|
this.formData.projectCode = res.data.projectCode;
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
} else {
|
} else {
|
||||||
await projectApi.updateProject(projectDataToSave);
|
const hasLog = await projectApi.projectHasLogData({
|
||||||
|
projectId: this.formData.projectId,
|
||||||
|
startDate: this.formData.startDate + " 00:00:00",
|
||||||
|
endDate: this.formData.endDate + " 23:59:59",
|
||||||
|
});
|
||||||
|
if (!hasLog.data) {
|
||||||
|
this.$modal
|
||||||
|
.confirm(
|
||||||
|
`检测到项目时间范围外的日志记录,修改项目时间将导致这些日志被删除。请确认是否继续修改?`
|
||||||
|
)
|
||||||
|
.then(async () => {
|
||||||
|
await projectApi.updateProject(projectDataToSave);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
await projectApi.updateProject(projectDataToSave);
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.$modal.msgSuccess("项目保存成功");
|
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError("请检查表单填写是否正确");
|
this.$modal.msgError("请检查表单填写是否正确");
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -425,7 +450,7 @@ export default {
|
||||||
},
|
},
|
||||||
cancelUserEdit(row) {
|
cancelUserEdit(row) {
|
||||||
row.isEditing = false;
|
row.isEditing = false;
|
||||||
row.postId=row.originalPost
|
row.postId = row.originalPost;
|
||||||
},
|
},
|
||||||
openSelectUser(row) {
|
openSelectUser(row) {
|
||||||
this.currentEditingRow = row;
|
this.currentEditingRow = row;
|
||||||
|
@ -483,7 +508,11 @@ export default {
|
||||||
showTimesheet(row) {
|
showTimesheet(row) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/",
|
path: "/",
|
||||||
query: { userId: row.userId, projectId: this.formData.projectId,nickName:row.userName },
|
query: {
|
||||||
|
userId: row.userId,
|
||||||
|
projectId: this.formData.projectId,
|
||||||
|
nickName: row.userName,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
confirmDelete(row) {
|
confirmDelete(row) {
|
||||||
|
@ -585,7 +614,7 @@ export default {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.project-management {
|
.project-management {
|
||||||
padding: 20px;
|
padding: 30px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
height: 88vh;
|
height: 88vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -595,7 +624,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-form {
|
.custom-form {
|
||||||
width: 80%;
|
width: 100%;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,7 +675,10 @@ export default {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.userBox {
|
.userBox {
|
||||||
width: 80%;
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
.table-actions {
|
.table-actions {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目状态" class="form-item">
|
<el-form-item label="项目状态" class="form-item">
|
||||||
<el-select v-model="searchForm.projectState" placeholder="项目状态">
|
<el-select v-model="searchForm.projectState" placeholder="项目状态">
|
||||||
|
<el-option label="全部" value="" />
|
||||||
<el-option label="未启动" value="0" />
|
<el-option label="未启动" value="0" />
|
||||||
<el-option label="进行中" value="1" />
|
<el-option label="进行中" value="1" />
|
||||||
<el-option label="已完成" value="2" />
|
<el-option label="已完成" value="2" />
|
||||||
|
@ -41,38 +42,39 @@
|
||||||
>+ 新建项目</el-button
|
>+ 新建项目</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="f1 df">
|
||||||
<CustomTable
|
<CustomTable
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:total="total"
|
:total="total"
|
||||||
:show-selection="false"
|
:show-selection="false"
|
||||||
:show-index="true"
|
:show-index="true"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
>
|
tableHeight="600"
|
||||||
<template slot="operation" slot-scope="{ row }">
|
>
|
||||||
<div class="operation-buttons">
|
<template slot="operation" slot-scope="{ row }">
|
||||||
<el-button
|
<div class="operation-buttons">
|
||||||
@click="handleEdit(row)"
|
<el-button
|
||||||
type="text"
|
@click="handleEdit(row)"
|
||||||
size="mini"
|
type="text"
|
||||||
icon="el-icon-edit"
|
size="mini"
|
||||||
v-hasPermi="['project:list:eidt']"
|
icon="el-icon-edit"
|
||||||
>编辑</el-button
|
v-hasPermi="['project:list:eidt']"
|
||||||
>
|
>编辑</el-button
|
||||||
<el-button
|
>
|
||||||
type="text"
|
<el-button
|
||||||
size="mini"
|
type="text"
|
||||||
icon="el-icon-delete"
|
size="mini"
|
||||||
@click="handleDelete(row)"
|
icon="el-icon-delete"
|
||||||
v-hasPermi="['project:list:delete']"
|
@click="handleDelete(row)"
|
||||||
>删除</el-button
|
v-hasPermi="['project:list:delete']"
|
||||||
>
|
>删除</el-button
|
||||||
</div>
|
>
|
||||||
</template>
|
</div>
|
||||||
</CustomTable>
|
</template>
|
||||||
|
</CustomTable>
|
||||||
|
</div>
|
||||||
<SelectUser
|
<SelectUser
|
||||||
:dialogVisible="userSelectDialogVisible"
|
:dialogVisible="userSelectDialogVisible"
|
||||||
:multiSelect="false"
|
:multiSelect="false"
|
||||||
|
@ -184,11 +186,9 @@ export default {
|
||||||
},
|
},
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.currentDeleteItem = row;
|
this.currentDeleteItem = row;
|
||||||
this.$modal
|
this.$modal.confirm(`是否确认删项目"${row.projectName}"`).then(() => {
|
||||||
.confirm(`是否确认删项目"${row.projectName}"`)
|
return this.confirmDelete(row.menuId);
|
||||||
.then(() => {
|
});
|
||||||
return this.confirmDelete(row.menuId);
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
async confirmDelete() {
|
async confirmDelete() {
|
||||||
await projectApi.deleteProject(this.currentDeleteItem.projectId);
|
await projectApi.deleteProject(this.currentDeleteItem.projectId);
|
||||||
|
@ -242,6 +242,8 @@ export default {
|
||||||
height: 88vh;
|
height: 88vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-bar {
|
.search-bar {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<div class="project-progress-container">
|
<div class="project-progress-container">
|
||||||
<!-- 左侧固定列表格 -->
|
<!-- 左侧固定列表格 -->
|
||||||
<div class="content flex-col">
|
<div class="content flex-col">
|
||||||
|
<div class="shadowBox"></div>
|
||||||
<div class="flex-row aic mb20">
|
<div class="flex-row aic mb20">
|
||||||
<h2 class="textC">项目执行表</h2>
|
<h2 class="textC">项目执行表</h2>
|
||||||
<div class="date-range-container">
|
<div class="date-range-container">
|
||||||
|
@ -26,6 +27,7 @@
|
||||||
:showPagination="false"
|
:showPagination="false"
|
||||||
:showSummary="true"
|
:showSummary="true"
|
||||||
:summaryMethod="getFixedColumnsSummaries"
|
:summaryMethod="getFixedColumnsSummaries"
|
||||||
|
tableHeight="600"
|
||||||
></CustomTable>
|
></CustomTable>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -220,6 +222,7 @@ export default {
|
||||||
height: 88vh;
|
height: 88vh;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -231,7 +234,7 @@ export default {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
::v-deep .el-table {
|
::v-deep .el-table {
|
||||||
height: 100% !important;
|
max-height: calc(100vh - 260px) !important;
|
||||||
}
|
}
|
||||||
::v-deep .el-table__header th {
|
::v-deep .el-table__header th {
|
||||||
background-color: #4a4a4a;
|
background-color: #4a4a4a;
|
||||||
|
@ -285,9 +288,9 @@ export default {
|
||||||
}
|
}
|
||||||
/* 调整合计行的样式 */
|
/* 调整合计行的样式 */
|
||||||
::v-deep .el-table__footer-wrapper {
|
::v-deep .el-table__footer-wrapper {
|
||||||
bottom: 0;
|
// bottom: 0;
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
font-weight: bold;
|
// font-weight: bold;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,5 +322,15 @@ export default {
|
||||||
}
|
}
|
||||||
::v-deep .el-table__fixed {
|
::v-deep .el-table__fixed {
|
||||||
box-shadow: 5px 20px 20px rgba(7, 7, 7, 0.5) !important;
|
box-shadow: 5px 20px 20px rgba(7, 7, 7, 0.5) !important;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.shadowBox {
|
||||||
|
// position: absolute;
|
||||||
|
// box-shadow: 2px 10px 10px 2px rgba(7, 7, 7, 0.8) !important;
|
||||||
|
// width: 1px;
|
||||||
|
// height: 95%;
|
||||||
|
// left: 450px;
|
||||||
|
// z-index: 100;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
:showPagination="false"
|
:showPagination="false"
|
||||||
:showSummary="true"
|
:showSummary="true"
|
||||||
:summaryMethod="getFixedColumnsSummaries"
|
:summaryMethod="getFixedColumnsSummaries"
|
||||||
|
:tableHeight="600"
|
||||||
></CustomTable>
|
></CustomTable>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="register">
|
<div class="register">
|
||||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||||
<h3 class="title">PMS:新光线平台</h3>
|
<h3 class="title">新光线平台</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||||
|
|
|
@ -10,10 +10,7 @@
|
||||||
@click="toggleCollapse"
|
@click="toggleCollapse"
|
||||||
class="collapse-button"
|
class="collapse-button"
|
||||||
>
|
>
|
||||||
<el-icon :size="20">
|
{{ !isCollapsed ? "收起" : "展开" }}
|
||||||
<!-- <ArrowLeft v-if="!isCollapsed" />
|
|
||||||
<ArrowRight v-else /> -->
|
|
||||||
</el-icon>
|
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,13 +22,18 @@
|
||||||
{ prop: 'workTime', label: '工时(天)', align: 'center' },
|
{ prop: 'workTime', label: '工时(天)', align: 'center' },
|
||||||
]"
|
]"
|
||||||
:tableData="projectList"
|
:tableData="projectList"
|
||||||
:rowClick="handleProjectClick"
|
:rowClick="
|
||||||
|
(row) => {
|
||||||
|
handleProjectClick(row, 1);
|
||||||
|
}
|
||||||
|
"
|
||||||
:show-summary="true"
|
:show-summary="true"
|
||||||
:summary-method="getSummaries"
|
:summary-method="getSummaries"
|
||||||
sum-text="合计工时(h)"
|
sum-text="合计工时(天)"
|
||||||
:showPagination="false"
|
:showPagination="false"
|
||||||
:highligt="true"
|
:highligt="true"
|
||||||
ref="projectRef"
|
ref="projectRef"
|
||||||
|
style="height: 100%"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -136,13 +138,19 @@
|
||||||
type="number"
|
type="number"
|
||||||
v-model="logForm.workTime"
|
v-model="logForm.workTime"
|
||||||
:max="logForm.max"
|
:max="logForm.max"
|
||||||
:placeholder="`剩余工时${logForm.max}`"
|
:placeholder="
|
||||||
|
projectInfo.userId == $store.state.user.id
|
||||||
|
? `可填报工时:${logForm.max}人天`
|
||||||
|
: ''
|
||||||
|
"
|
||||||
:disabled="!(projectInfo.userId == $store.state.user.id)"
|
:disabled="!(projectInfo.userId == $store.state.user.id)"
|
||||||
|
:step="0.1"
|
||||||
|
min="0"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
v-if="projectInfo.userId == $store.state.user.id"
|
v-if="projectInfo.userId == $store.state.user.id"
|
||||||
>{{ `当天剩余可分配工时 ${logForm.max}天` }}</el-button
|
>{{ `当天剩余可分配工时:${logForm.max}人天` }}</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工作内容">
|
<el-form-item label="工作内容">
|
||||||
|
@ -193,13 +201,14 @@ export default {
|
||||||
max: 1,
|
max: 1,
|
||||||
loggerId: "",
|
loggerId: "",
|
||||||
},
|
},
|
||||||
|
routeQuery: this.$route.query,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleCollapse() {
|
toggleCollapse() {
|
||||||
this.isCollapsed = !this.isCollapsed;
|
this.isCollapsed = !this.isCollapsed;
|
||||||
},
|
},
|
||||||
async handleProjectClick(row) {
|
async handleProjectClick(row, first) {
|
||||||
if (!row.projectId) {
|
if (!row.projectId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -220,9 +229,9 @@ export default {
|
||||||
userId: this.projectInfo.userId,
|
userId: this.projectInfo.userId,
|
||||||
});
|
});
|
||||||
this.logData = res2.data;
|
this.logData = res2.data;
|
||||||
this.initDateColor();
|
this.initDateColor(first);
|
||||||
},
|
},
|
||||||
initDateColor() {
|
initDateColor(first) {
|
||||||
this.logData.map((item) => {
|
this.logData.map((item) => {
|
||||||
var ele = document.getElementById(item.date.split(" ")[0]);
|
var ele = document.getElementById(item.date.split(" ")[0]);
|
||||||
if (ele) {
|
if (ele) {
|
||||||
|
@ -233,6 +242,12 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (document.getElementsByClassName("is-selected")[0] && first == 1) {
|
||||||
|
document.getElementsByClassName("is-selected")[0].className = document
|
||||||
|
.getElementsByClassName("is-selected")[0]
|
||||||
|
.className.replace("is-selected", "");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async openLogDialog(data) {
|
async openLogDialog(data) {
|
||||||
if (!this.projectInfo.projectId) {
|
if (!this.projectInfo.projectId) {
|
||||||
|
@ -247,7 +262,10 @@ export default {
|
||||||
clickedDate.getTime() > currentDate.getTime() &&
|
clickedDate.getTime() > currentDate.getTime() &&
|
||||||
clickedDate.getTime() < new Date(this.projectInfo.endDate).getTime()
|
clickedDate.getTime() < new Date(this.projectInfo.endDate).getTime()
|
||||||
) {
|
) {
|
||||||
this.$modal.msgWarning("不可编辑未来日期");
|
if (this.projectInfo.userId == this.$store.state.user.id)
|
||||||
|
this.$modal.msgWarning("不可编辑未来日期");
|
||||||
|
else this.$modal.msgWarning("不可查看未来日期");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,7 +323,7 @@ export default {
|
||||||
const sums = [];
|
const sums = [];
|
||||||
columns.forEach((column, index) => {
|
columns.forEach((column, index) => {
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
sums[index] = "合计工时(h)";
|
sums[index] = "合计工时(天)";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const values = data.map((item) => Number(item[column.property]));
|
const values = data.map((item) => Number(item[column.property]));
|
||||||
|
@ -337,6 +355,9 @@ export default {
|
||||||
) {
|
) {
|
||||||
this.$modal.msgWarning("工时只允许一位小数");
|
this.$modal.msgWarning("工时只允许一位小数");
|
||||||
return;
|
return;
|
||||||
|
} else if (this.logForm.workTime <= 0) {
|
||||||
|
this.$modal.msgWarning("工时不能小于等于0");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
let state =
|
let state =
|
||||||
new Date(this.logForm.loggerDate).getTime() ==
|
new Date(this.logForm.loggerDate).getTime() ==
|
||||||
|
@ -363,6 +384,7 @@ export default {
|
||||||
async fetchUserProjects() {
|
async fetchUserProjects() {
|
||||||
try {
|
try {
|
||||||
const response = await workLogApi.userProject(this.projectInfo.userId);
|
const response = await workLogApi.userProject(this.projectInfo.userId);
|
||||||
|
console.log(12333, this.projectList);
|
||||||
this.projectList = response.data;
|
this.projectList = response.data;
|
||||||
if (this.projectList.length) {
|
if (this.projectList.length) {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
|
@ -371,28 +393,38 @@ export default {
|
||||||
(ele) => ele.projectId == this.$route.query.projectId
|
(ele) => ele.projectId == this.$route.query.projectId
|
||||||
);
|
);
|
||||||
if (this.$route.query.projectId && arr.length) {
|
if (this.$route.query.projectId && arr.length) {
|
||||||
this.handleProjectClick(arr[0]);
|
this.handleProjectClick(arr[0], 1);
|
||||||
this.$refs.projectRef.setCurrentRow(arr[0]);
|
this.$refs.projectRef.setCurrentRow(arr[0]);
|
||||||
this.projectList = arr;
|
this.projectList = arr;
|
||||||
} else {
|
} else {
|
||||||
this.handleProjectClick(this.projectList[0]);
|
this.handleProjectClick(this.projectList[0], 1);
|
||||||
this.$refs.projectRef.setCurrentRow(this.projectList[0]);
|
this.$refs.projectRef.setCurrentRow(this.projectList[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
},
|
},
|
||||||
|
init() {
|
||||||
|
if (this.$route.query.userId) {
|
||||||
|
this.projectInfo.userId = this.$route.query.userId;
|
||||||
|
this.projectInfo.nickName = this.$route.query.nickName;
|
||||||
|
} else {
|
||||||
|
let userInfo = this.$store.state.user;
|
||||||
|
this.projectInfo.userId = userInfo.id;
|
||||||
|
this.projectInfo.nickName = userInfo.nickName;
|
||||||
|
}
|
||||||
|
//获取项目列表
|
||||||
|
this.fetchUserProjects();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route(to, from) {
|
||||||
|
if (!this.$route.query.userId) {
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.$route.query.userId) {
|
this.init();
|
||||||
this.projectInfo.userId = this.$route.query.userId;
|
|
||||||
this.projectInfo.nickName = this.$route.query.nickName;
|
|
||||||
} else {
|
|
||||||
let userInfo = this.$store.state.user;
|
|
||||||
this.projectInfo.userId = userInfo.id;
|
|
||||||
this.projectInfo.nickName = userInfo.nickName;
|
|
||||||
}
|
|
||||||
//获取项目列表
|
|
||||||
this.fetchUserProjects();
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -405,6 +437,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.project-list {
|
.project-list {
|
||||||
|
height: 88vh;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
border-right: 1px solid #dcdfe6;
|
border-right: 1px solid #dcdfe6;
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
|
@ -481,8 +514,8 @@ export default {
|
||||||
|
|
||||||
.project-info-calendar .calendar-view ::v-deep .el-calendar-day {
|
.project-info-calendar .calendar-view ::v-deep .el-calendar-day {
|
||||||
height: 65px; /* 增加日期单元格高度(原高度 + 5px) */
|
height: 65px; /* 增加日期单元格高度(原高度 + 5px) */
|
||||||
padding-top: 5px;
|
// padding-top: 5px;
|
||||||
padding: 5px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.project-info-calendar .calendar-view ::v-deep .el-calendar-day.disabled {
|
.project-info-calendar .calendar-view ::v-deep .el-calendar-day.disabled {
|
||||||
|
@ -519,7 +552,9 @@ export default {
|
||||||
::v-deep .el-table {
|
::v-deep .el-table {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
::v-deep .log-form .el-date-editor {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
::v-deep .el-table__body-wrapper {
|
::v-deep .el-table__body-wrapper {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ function resolve(dir) {
|
||||||
|
|
||||||
const CompressionPlugin = require('compression-webpack-plugin')
|
const CompressionPlugin = require('compression-webpack-plugin')
|
||||||
|
|
||||||
const name = process.env.VUE_APP_TITLE || 'PMS:新光线平台' // 网页标题
|
const name = process.env.VUE_APP_TITLE || '新光线平台' // 网页标题
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue