Commit 2d33a900 authored by daywrite's avatar daywrite

测试新建项目

parent 2b045290
...@@ -35,5 +35,17 @@ export default { ...@@ -35,5 +35,17 @@ export default {
getTaskGroupNew: { getTaskGroupNew: {
// url: '/vue/task/get-new-group' // url: '/vue/task/get-new-group'
url: '/vue/sales-order/get-new' url: '/vue/sales-order/get-new'
},
deleteTaskGroup: {
url: '/vue/task/delete-group'
},
closeTaskGroup: {
url: '/vue/task/close-group'
},
stopTaskGroup: {
url: '/vue/task/close-group'
} }
} }
.task-app { .task-app {
.el-button--cancel {
color:white;
background-color: #EB7567;
border-color: #e86150;
}
.el-button--confirm {
color:white;
background-color:#649FD7;
border-color:#5092d2;
}
.obear-app-frame__white { .obear-app-frame__white {
border: 1px solid white; border: 1px solid white;
border-radius:2px; border-radius:2px;
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
<el-col :span="4" slot="pre"> <el-col :span="4" slot="pre">
<el-form-item> <el-form-item>
<singleRadioTool <singleRadioTool
:form-item="groupType" :form-item="form['TaskGroupSearch[filter]']"
:options-list="groupArray" :options-list="groupArray"
@update:item="val => { reimTypeChange(val) }"> @update:item="val => { groupTypeChange(val) }">
</singleRadioTool> </singleRadioTool>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
:key="item.id"> :key="item.id">
<span slot="opearate" class="obear-opearate-button"> <span slot="opearate" class="obear-opearate-button">
<el-button type="primary" size="mini" @click.prevent.stop="leaveMessageSch(item)"><span class="badge" v-if="item.commentCount.comment">{{ item.commentCount.comment ? item.commentCount.comment : '' }}</span><i class="fa fa-commenting"></i>留言</el-button> <el-button type="primary" size="mini" @click.prevent.stop="leaveMessageSch(item)"><span class="badge" v-if="item.commentCount.comment">{{ item.commentCount.comment ? item.commentCount.comment : '' }}</span><i class="fa fa-commenting"></i>留言</el-button>
<el-button type="primary" size="mini" @click.prevent.stop="checkSch(item)" :disabled="!item.can_update"><i class="fa fa-fw fa-check"></i>完成</el-button>
<el-button type="primary" size="mini" @click.prevent.stop="banSch(item)" :disabled="!item.can_update"><i class="fa fa-fw fa-ban"></i>中止</el-button>
<el-button type="primary" size="mini" @click.prevent.stop="editSch(item)" :disabled="!item.can_update"><i class="fa fa-edit animated"></i>编辑</el-button> <el-button type="primary" size="mini" @click.prevent.stop="editSch(item)" :disabled="!item.can_update"><i class="fa fa-edit animated"></i>编辑</el-button>
<el-button type="primary" size="mini" @click.prevent.stop="deleteSch(item.id)" :disabled="!item.can_delete"><i class="fa fa-trash-o animated-hove"></i>删除</el-button> <el-button type="primary" size="mini" @click.prevent.stop="deleteSch(item.id)" :disabled="!item.can_delete"><i class="fa fa-trash-o animated-hove"></i>删除</el-button>
</span> </span>
...@@ -125,15 +127,15 @@ export default { ...@@ -125,15 +127,15 @@ export default {
} }
], ],
filter: [], filter: [],
groupType: 'all', // groupType: 'all',
groupArray: [{ groupArray: [{
'key': 'all', 'key': '',
'name': '全部' 'name': '全部'
}, { }, {
'key': '1', 'key': 'my',
'name': '我参与的' 'name': '我参与的'
}, { }, {
'key': '2', 'key': 'head',
'name': '我领导的' 'name': '我领导的'
}], }],
taskType: 'group_list', taskType: 'group_list',
...@@ -145,7 +147,8 @@ export default { ...@@ -145,7 +147,8 @@ export default {
'name': '项目列表' 'name': '项目列表'
}], }],
form: { form: {
'ClientSearch[keyword]': '' 'ClientSearch[keyword]': '',
'TaskGroupSearch[filter]': ''
}, },
pagenation: { pagenation: {
thispage: 1, thispage: 1,
...@@ -186,6 +189,15 @@ export default { ...@@ -186,6 +189,15 @@ export default {
this.getList(params) this.getList(params)
}, },
groupTypeChange (val) {
this.form['TaskGroupSearch[filter]'] = val
let params = this.setParams({
...this.form,
page: this.pagenation.thispage
}, {'TaskGroupSearch[filter]': val})
this.getList(params)
},
reimTypeChange (val) { reimTypeChange (val) {
if (val === 'list') { if (val === 'list') {
this.$router.push({ this.$router.push({
...@@ -258,13 +270,45 @@ export default { ...@@ -258,13 +270,45 @@ export default {
this.$refs.taskGroupModal.show(item) this.$refs.taskGroupModal.show(item)
}, },
checkSch (id) {
this.$confirm('完成?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestAPI(api.closeTaskGroup, { id })
.then((res) => {
this._reload()
this.$message.success('删除成功')
})
}).catch(() => {
this.$message.info('取消删除')
})
},
banSch (id) {
this.$confirm('中止?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestAPI(api.stopTaskGroup, { id })
.then((res) => {
this._reload()
this.$message.success('删除成功')
})
}).catch(() => {
this.$message.info('取消删除')
})
},
deleteSch (id) { deleteSch (id) {
this.$confirm('删除该待办事项?', '提示', { this.$confirm('删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
requestAPI(api.deleteReim, { id }) requestAPI(api.deleteTaskGroup, { id })
.then((res) => { .then((res) => {
this._reload() this._reload()
this.$message.success('删除成功') this.$message.success('删除成功')
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<span>负责人:</span> <span>负责人:</span>
<span> <span>
<!-- <img class="user-avatar rounded-circle" :src="item.headOf.avatar.name">{{ item.headOf.name }} --> <img class="user-avatar rounded-circle" :src="item.headOf.avatar.name">{{ item.headOf.name }}
</span> </span>
</el-col> </el-col>
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
...@@ -42,17 +42,17 @@ ...@@ -42,17 +42,17 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="6" :xs="24"> <el-col :span="12" :xs="24">
<span>成员:</span> <span>成员:</span>
<span v-for="sItem in item.taskGroupUserRelationships"> <span v-for="sItem in item.taskGroupUserRelationships">
<!-- <img class="user-avatar rounded-circle" :src="item.user.avatar.name">{{ item.user.name }} --> <img class="user-avatar rounded-circle" :src="sItem.user.avatar.name">{{ sItem.user.name }}
</span> </span>
</el-col> </el-col>
<el-col :span="6" :xs="24"> <!-- <el-col :span="6" :xs="24">
</el-col> -->
<el-col :span="2" :xs="24">
</el-col> </el-col>
<el-col :span="6" :xs="24"> <el-col :span="10" :xs="24">
</el-col>
<el-col :span="6" :xs="24">
<slot name="opearate"> <slot name="opearate">
</slot> </slot>
</el-col> </el-col>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment