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 31, 2017
1 parent 9032632 commit 537c8e0
Show file tree
Hide file tree
Showing 25 changed files with 334 additions and 137 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
![image](https://ws4.sinaimg.cn/large/006tKfTcgy1fizo4p6jpnj31kw0zk1kx.jpg)
![image](https://ws4.sinaimg.cn/large/006tKfTcgy1fizo51xisrj31kw0zkhdf.jpg)
![image](https://ws1.sinaimg.cn/large/006tKfTcgy1fizo5g286pj31kw0zk1kx.jpg)
![image](https://ws2.sinaimg.cn/large/006tKfTcgy1fj37qqyw22j31kw0zk1kx.jpg)
Binary file modified build/icons/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/icons/icon.icns
Binary file not shown.
Binary file modified build/icons/icon.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pm_vue",
"version": "1.2.0",
"version": "1.3.0",
"author": "jeodiong <jeodiong@hotmail.com>",
"description": "An electron-vue project",
"license": null,
Expand All @@ -21,7 +21,7 @@
"postinstall": "npm run lint:fix"
},
"build": {
"productName": "ProductManager",
"productName": "PM Todo",
"appId": "io.qaf.productmanager",
"directories": {
"output": "build"
Expand Down
5 changes: 3 additions & 2 deletions src/renderer/components/_mixin/common.sass
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ input, textarea, button
// font-size: $fs-lg
// line-height: 50px
.button-group
margin-top: 10px
margin: 10px 15px
display: inline-block
button
margin-left: -1px
min-width: 80px
min-width: 70px
padding: 0 15px
height: 30px
line-height: 30px
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/components/_upload/imgupload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ export default {
multi_selection: false,
auto_start: true, // 选择文件后自动上传,若关闭需要自己绑定事件触发上传,
resize: {
width: 400,
quality: 70
width: 2000,
height: 1500
},
init: {
'FilesAdded' (up, files) {
Expand Down
19 changes: 9 additions & 10 deletions src/renderer/components/productInfo/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
router-link(:to='{name: "ProductTodoL"}' exact v-else)
i.iconfont.icon-daiban
span 我的任务

router-link(:to='{name: "ProductNotification"}' exact)
i.iconfont.icon-xiaoxi
span 消息中心
Expand All @@ -30,15 +29,15 @@
router-link(:to='{name: "ProductAllFilter"}' exact)
i.iconfont.icon-filter
span 全部任务
router-link(:to='{name: "ProductAllPost", query:{level: 1}}' exact)
i.iconfont.icon-daiban
span 待办
router-link(:to='{name: "ProductAllPost", query:{level: 2}}' exact)
i.iconfont.icon-shenhe
span 待审核
router-link(:to='{name: "ProductAllPost", query:{level: 5}}' exact)
i.iconfont.icon-wancheng
span 已归档
//- router-link(:to='{name: "ProductAllPost", query:{level: 1}}' exact)
//- i.iconfont.icon-daiban
//- span 待办
//- router-link(:to='{name: "ProductAllPost", query:{level: 2}}' exact)
//- i.iconfont.icon-shenhe
//- span 待审核
//- router-link(:to='{name: "ProductAllPost", query:{level: 5}}' exact)
//- i.iconfont.icon-wancheng
//- span 已归档
.border-dive
div.con
p.con-title 设置
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/productInfo/notification.jade
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.section-wrapper
//- a.mark-all-read 全部标记已读
.navigation-wrapper
.button-group
button(@click='changeType(0)', :class='{"active": type==0}') 未读
Expand Down
15 changes: 15 additions & 0 deletions src/renderer/components/productInfo/notification.sass
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
@import "../_mixin/mixin.sass"
.section-wrapper
.mark-all-read
position: fixed
bottom: 0
right: 0
width: 120px
height: 44px
line-height: 44px
text-align: center
color: $gray
box-shadow: $box-shadow
background: $a-color
color: white
&:hover
background: darken($a-color, 10%)
.navigation-wrapper
.section-content
.item-wrapper
position: relative
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/productInfo/notification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default {
if (res.data.code === 0) {
let { allData, nextPageNo } = res.data.data
allData = this.$_.chain(allData).map((obj) => {
obj.createdAt = this.$moment(obj.createdAt).format('YYYY/MM/DD h:mm:ss')
obj.createdAt = this.$moment(obj.createdAt).format('H:mm')
return obj
}).value()
this.allData = this.allData.concat(allData)
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/components/productInfo/settingVersions.jade
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
//- label 次版本号
//- input(v-model='versionSub' type='number')
//- p 版本{{version}}
Form.form-wrapper(:label-width="60")
Form-item.input-wrapper(label='主版本号')
Form.form-wrapper(:label-width="60", :rules="ruleValidate", ref="formData")
Form-item.input-wrapper(label='主版本号' prop="versionMain")
Input(size='large' v-model='versionMain')
Form-item.input-wrapper(label='次版本号')
Form-item.input-wrapper(label='子版本号' prop="versionSub")
Input(size='large' v-model='versionSub')
Form-item.input-wrapper
Button(type='primary' @click='handleSubmit', :loading="modal_create_loading") 添加
Expand Down
23 changes: 0 additions & 23 deletions src/renderer/components/productInfo/settingVersions.sass

This file was deleted.

74 changes: 51 additions & 23 deletions src/renderer/components/productInfo/settingVersions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,40 @@
export default {
name: 'ProductSettingVersions',
data () {
const validateNumber = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入正整数'))
} else {
if (!this.$api.isNumber(this.versionMain)) {
callback(new Error('请输入正整数'))
}
callback()
}
}
const validateNumber2 = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入正整数'))
} else {
if (!this.$api.isNumber(this.versionSub)) {
callback(new Error('请输入正整数'))
}
callback()
}
}
return {
modal_create_loading: false,
curProduct: {
},
versionMain: '',
versionSub: ''
versionSub: '',
ruleValidate: {
versionMain: [
{ validator: validateNumber, trigger: 'blur' }
],
versionSub: [
{ validator: validateNumber2, trigger: 'blur' }
]
}
}
},
computed: {
Expand Down Expand Up @@ -38,27 +66,27 @@ export default {
})
},
handleSubmit () {
if (!this.versionMain || !this.versionSub) {
this.$Message.error('版本号必填')
return
}
this.modal_create_loading = true
let url = this.$api.productSettingAddVersion
let body = {
data: {
_id: this.curProduct._id,
version: this.version
}
}
this.$http.post(url, body).then((res) => {
this.modal_create_loading = false
if (res.data.code === 0) {
this.getData()
this.$Message.success('保存成功')
this.versionMain = ''
this.versionSub = ''
} else {
this.$Message.error('保存失败')
this.$refs.formData.validate((valid) => {
if (valid) {
this.modal_create_loading = true
let url = this.$api.productSettingAddVersion
let body = {
data: {
_id: this.curProduct._id,
version: this.version
}
}
this.$http.post(url, body).then((res) => {
this.modal_create_loading = false
if (res.data.code === 0) {
this.getData()
this.$Message.success('保存成功')
this.versionMain = ''
this.versionSub = ''
} else {
this.$Message.error('保存失败')
}
})
}
})
},
Expand Down Expand Up @@ -91,5 +119,5 @@ export default {
}
</script>

<style lang="sass" scoped src='./settingVersions.sass'>
<style lang="sass" scoped src='./settingTags.sass'>
</style>
92 changes: 70 additions & 22 deletions src/renderer/components/productInfo/statistics.jade
Original file line number Diff line number Diff line change
@@ -1,22 +1,70 @@
//- .section-wrapper
//- .section-content
//- .item-wrapper
//- //- .wrapper-title ALL TASKS
//- .con
//- .block
//- p.des 全部
//- p.item-title 456
//- p.item-title 456
//- .block
//- p.des 待办
//- p.item-title 99
//- p.item-title 99
//- .block
//- p.des 待审核
//- p.item-title 36
//- p.item-title 36
//- .block
//- p.des 归档
//- p.item-title 196
//- p.item-title 196
NoData
.section-wrapper.statistics-wrapper
NoData(v-if='!tagArray || !versionArray || tagArray.length == 0 || versionArray == 0')
.navigation-wrapper
.button-group
button(@click='changeType(0)', :class='{"active": type==0}') 全部
button(@click='changeType(1)', :class='{"active": type==1}') Bug
button(@click='changeType(2)', :class='{"active": type==2}') 需求
.version-select-wrapper
Select.version-select(v-if='curProduct && curProduct.versions && curProduct.versions.length > 0' v-model='version' placeholder='全部版本' @on-change='changeVersion')
Option(value='0') 全部版本
Option(v-for='item of curProduct.versions', :value='item', :key='item')
.version-select-wrapper.version-select-wrapper-date
Select.version-select(v-model='day' placeholder='全部日期' @on-change='changeDay')
Option(value='0') 全部日期
Option(value='1') 24h
Option(value='2') 7天
Option(value='3') 30天
//- .button-group.date
//- a(@click='changeDay(0)', :class='{"active": day==0}') 全部
//- a(@click='changeDay(1)', :class='{"active": day==1}') 24h
//- a(@click='changeDay(2)', :class='{"active": day==2}') 7天
//- a(@click='changeDay(3)', :class='{"active": day==3}') 30天
.section-content
.item-wrapper(v-if='tagArray && tagArray.length > 0')
.con
.block.header
p.des Tags
.block.header
p.des 待办
.block.header
p.des 待审核
.block.header
p.des 归档
.block.header
p.des 全部任务
.con(v-for='item of tagArray')
.block
.item-title {{item._id ? item._id : "无标签"}}
.block
.item-title {{item.no_1 ? item.no_1 : ''}}
.block
.item-title {{item.no_2 ? item.no_2 : ''}}
.block
.item-title {{item.no_5 ? item.no_5 : ''}}
.block
.item-title {{item.no_all ? item.no_all : ''}}
.item-wrapper(v-if='versionArray && versionArray.length > 0')
.con
.block.header
p.des Versions
.block.header
p.des 待办
.block.header
p.des 待审核
.block.header
p.des 归档
.block.header
p.des 全部任务
.con(v-for='item of versionArray')
.block
.item-title {{item._id ? item._id : "无版本号"}}
.block
.item-title {{item.no_1 ? item.no_1 : ''}}
.block
.item-title {{item.no_2 ? item.no_2 : ''}}
.block
.item-title {{item.no_5 ? item.no_5 : ''}}
.block
.item-title {{item.no_all ? item.no_all : ''}}

Loading

0 comments on commit 537c8e0

Please sign in to comment.