Skip to content

Commit

Permalink
1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-lz committed Aug 28, 2017
1 parent 1ef3115 commit 5416e59
Show file tree
Hide file tree
Showing 18 changed files with 363 additions and 108 deletions.
22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,10 @@
# Install
###### 1、支持Mac和Windows
###### 下载 https://github.com/jeodiong/ProductManager/releases
# Start
### 创建产品
![image](https://user-images.githubusercontent.com/8166360/29516118-ba3207f0-86a1-11e7-9032-7b25eb352162.png)
### 账户设置
![image](https://user-images.githubusercontent.com/8166360/29516169-f0a1ecba-86a1-11e7-97f5-7aef78e3790e.png)
### 创建任务
![image](https://user-images.githubusercontent.com/8166360/29516459-fbf4b236-86a2-11e7-9dbf-2737058f8e22.png)
### 任务列表
![image](https://user-images.githubusercontent.com/8166360/29516309-83c178e4-86a2-11e7-802b-f99127c709e9.png)
### Matrix Mode
![image](https://user-images.githubusercontent.com/8166360/29517234-bb788580-86a6-11e7-9986-9036b1f3fac4.png)
### 任务流转
![image](https://user-images.githubusercontent.com/8166360/29516950-5499828e-86a5-11e7-9917-51d0f5b02efc.png)
### 添加成员
![image](https://user-images.githubusercontent.com/8166360/29516350-a12c9850-86a2-11e7-91b1-d5d462cb462d.png)
# Screenshot
![image](https://ws3.sinaimg.cn/large/006tKfTcgy1fizo1lqq05j31kw0zke7f.jpg)
![image](https://ws2.sinaimg.cn/large/006tKfTcgy1fizo3ylm00j31kw0zk1kx.jpg)
![image](https://ws1.sinaimg.cn/large/006tKfTcgy1fizo4a236sj31kw0zk1km.jpg)
![image](https://ws4.sinaimg.cn/large/006tKfTcgy1fizo4p6jpnj31kw0zk1kx.jpg)
![image](https://ws4.sinaimg.cn/large/006tKfTcgy1fizo51xisrj31kw0zkhdf.jpg)
![image](https://ws1.sinaimg.cn/large/006tKfTcgy1fizo5g286pj31kw0zk1kx.jpg)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pm_vue",
"version": "1.1.0",
"version": "1.2.0",
"author": "jeodiong <jeodiong@hotmail.com>",
"description": "An electron-vue project",
"license": null,
Expand Down
2 changes: 1 addition & 1 deletion src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>Product Manager</title>
<link rel="stylesheet" href="https://at.alicdn.com/t/font_374327_bq7srja734kxd2t9.css">
<link rel="stylesheet" href="https://at.alicdn.com/t/font_374327_hm62n4rb2ekrcnmi.css">
<% if (htmlWebpackPlugin.options.nodeModules) { %>
<!-- Add `node_modules/` to global paths so `require` works properly in development -->
<script>
Expand Down
2 changes: 1 addition & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function createWindow () {
mainWindow = new BrowserWindow({
// width: width - 100,
// height: height - 100,
width: 1010,
width: 1100,
height: 700,
useContentSize: true,
titleBarStyle: 'hidden-inset'
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/components/_mixin/common.sass
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ input, button, textarea, .ivu-select-selection, .ivu-select-dropdown, .ivu-modal
line-height: 33px
.ivu-tabs-tab-active
font-weight: $fw-lg
.ivu-radio-group
overflow: hidden
.w-e-toolbar
display: none !important
.w-e-text-container
Expand All @@ -150,3 +152,5 @@ input, button, textarea, .ivu-select-selection, .ivu-select-dropdown, .ivu-modal
background: white
.ivu-tabs
padding-top: 50px
.ivu-form-item-label
color: $gray !important
50 changes: 50 additions & 0 deletions src/renderer/components/productInfo/allFilter.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.section-wrapper.allFilter-wrapper(v-if='stateInfo && stateInfo.curProduct')
.filter-wrapper
Tooltip(content='类型' placement="top")
Select(placeholder='类型' v-model='formData.type' @on-change='handleChange')
Option(v-for='item of stateInfo.typeArr', :value='item.id', :key='item.id') {{item.name}}
Tooltip(content='版本' placement="top")
Select(placeholder='版本' v-model='formData.version' @on-change='handleChange')
Option(v-for='item of stateInfo.curProduct.versions', :value='item', :key='item')
Tooltip(content='标签' placement="top")
Select(placeholder='标签' v-model='formData.tag' @on-change='handleChange')
Option(v-for='item of stateInfo.curProduct.tags', :value='item', :key='item')
//- Tooltip(content='重要性' placement="top")
//- Select(placeholder='重要性' @on-change='handleChange')
//- Option(value='true') 重要
//- Option(value='false') 不重要
//- Tooltip(content='紧急性' placement="top")
//- Select(placeholder='紧急性' @on-change='handleChange')
//- Option(value='true') 紧急
//- Option(value='false') 不紧急
Tooltip(content='状态' placement="top")
Select(placeholder='状态' @on-change='handleChange' v-model='formData.level')
Option(v-for='item of stateInfo.levelArr', :value='item.id', :key='item.id') {{item.name}}
Tooltip(content='创建人' placement="top")
Select(placeholder='创建人' v-model='formData.createrId' @on-change='handleChange')
Option(v-for='item of allUser', :value='item.userId._id', :key='item.userId._id') {{item.userId.name}}
Tooltip(content='执行人' placement="top")
Select(placeholder='执行人' v-model='formData.to' @on-change='handleChange')
Option(v-for='item of allUser', :value='item.userId._id', :key='item.userId._id') {{item.userId.name}}
Tooltip(content='完成人' placement="top")
Select(placeholder='完成人' v-model='formData.finisherId' @on-change='handleChange')
Option(v-for='item of allUser', :value='item.userId._id', :key='item.userId._id') {{item.userId.name}}
Button(type='primary' @click='handleReset') 重置
.allData-wrapper
.section-content(v-if='allData && allData.length > 0')
.item-wrapper(v-for='item of allData' @click.stop='handleEdit(item)', :class='{"selected": selected==item._id}')
.state
span.isImportant(v-if='item.isImportant') 重要
span.not(v-else) -
span.isUrgent(v-if='item.isUrgent') 紧急
span.not(v-else) -
span.title(v-text='item.title')
.state
span.type(v-if='item.type == 1') Bug
span.type.newNeed(v-else-if='item.type == 2') 需求
span.tag {{item.to.name}}
span.tag(v-if='item.tag') {{item.tag}}
span.tag(v-if='item.version') V{{item.version}}
.loadMore(@click='getAllData' v-if='allData && allData.length > 0 && nextPageNo > 0') 加载更多
NoData(v-if='allData && allData.length == 0 && nextPageNo==0')
TodoEdit.todoEdit-wrapper(:curPost='curPost', :page='$route.name', :class='{"isEdit": isEdit}')
66 changes: 66 additions & 0 deletions src/renderer/components/productInfo/allFilter.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
@import "../_mixin/mixin.sass"

.section-wrapper
height: 100%
.filter-wrapper
display: flex
border-bottom: $border
.section-content
padding-bottom: 50px
.item-wrapper
padding-left: 10px
display: flex
height: 44px
line-height: 44px
border-bottom: $border
cursor: pointer
opacity: 0.5
font-weight: $fw-lg
&:hover, &.selected
// background: $bg-color
background: $gray-sub-sub
opacity: 1
.tag
padding: 0 10px
margin-right: 5px
height: 22px
line-height: 22px
background: $gray-sub-sub
color: $gray
border-radius: 11px
margin-top: 11px
.state
display: inline-block
padding-right: 5px
span
display: inline-block
width: 30px
height: 18px
line-height: 18px
text-align: center
margin-right: 5px
background: transparent
color: $gray-sub-sub
.isImportant, .isUrgent
// background: $red
color: $red
.isUrgent
// background: $yellow
color: $yellow
.type
display: inline-block
background: transparent
color: $gray-sub
&.newNeed
color: $a-color
.title
flex: 1
white-space: nowrap
text-overflow: ellipsis
overflow: hidden
// color: $gray
.todoEdit-wrapper
right: -600px
transition: $transition
&.isEdit
right: 0
145 changes: 145 additions & 0 deletions src/renderer/components/productInfo/allFilter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<template lang="jade" src='./allFilter.jade'>

</template>

<script>
import TodoEdit from './todoEdit'
import NoData from '@/components/_include/nodata'
export default {
name: 'ProductAllFilter',
components: {
TodoEdit, NoData
},
data () {
return {
stateInfo: {},
allUser: [],
allData: [],
formData: {
productId: this.$route.params.id,
type: '',
level: '',
tag: '',
version: '',
createrId: '',
to: '',
finisherId: ''
},
pageSize: this.$api.pageSize,
nextPageNo: 1,
curPost: {},
isEdit: false,
selected: ''
}
},
created () {
this.getAllUser()
this.getAllData()
this.$nextTick(() => {
window.addEventListener('click', () => {
this.isEdit = false
})
})
this.busEventStateInfo()
this.busEventRouteName()
},
methods: {
reset () {
this.allData = []
this.curPost = {}
this.isEdit = false
this.selected = ''
this.nextPageNo = 1
},
resetForm () {
this.formData = {
productId: this.$route.params.id,
type: '',
level: '',
tag: '',
version: '',
createrId: '',
to: '',
finisherId: ''
}
},
busEventStateInfo () {
this.$bus.off('StateInfo')
this.$bus.once('StateInfo', content => {
this.stateInfo = content
})
},
busEventRouteName () {
this.$bus.off(this.$route.name)
this.$bus.once(this.$route.name, content => {
this.isEdit = false
this.getAllData()
})
},
getAllUser () {
let url = this.$api.productAllUser
let body = {
data: {
productId: this.$route.params.id
}
}
this.$http.post(url, body).then((res) => {
if (res.data.code === 0) {
this.allUser = res.data.data.allData
}
})
},
getAllData () {
let url = this.$api.postAllByFilter
let body = {
data: {
formData: this.formData,
pageSize: this.pageSize,
nextPageNo: this.nextPageNo
}
}
this.$http.post(url, body).then((res) => {
if (res.data.code === 0) {
let { allData, nextPageNo } = res.data.data
this.allData = this.allData.concat(allData)
this.nextPageNo = nextPageNo
}
})
},
handleChange () {
this.reset()
this.getAllData()
},
handleReset () {
this.reset()
this.resetForm()
this.getAllData()
},
handleEdit (item) {
this.busEventRouteName()
this.selected = item._id
this.isEdit = true
this.curPost = item
}
}
}
</script>

<style lang="sass" scoped src='./allFilter.sass'>
</style>
<style lang='sass'>
.allFilter-wrapper
.filter-wrapper
.ivu-tooltip
flex: 1
.ivu-tooltip-rel
min-width: 80px
.ivu-select-selection
border: none
box-shadow: none
height: 44px
.ivu-select-placeholder, .ivu-select-selected-value
text-align: right
height: 44px
line-height: 44px
</style>
Loading

0 comments on commit 5416e59

Please sign in to comment.