|
|
@@ -12,17 +12,39 @@
|
|
|
@click="selectTr===i+1?selectTr=0:selectTr=i+1"
|
|
|
:class="selectTr===i+1?'focusing' : ''">
|
|
|
<td><input class="checkItem" type="checkbox" :value="requirement.id"></td>
|
|
|
- <td>@{{ i+1 }}</td>
|
|
|
+ <td>@{{ requirement.id }}</td>
|
|
|
<td>@{{ requirement.creator.name }}</td>
|
|
|
<td>@{{ requirement.score }}</td>
|
|
|
<td>@{{ requirement.title }}</td>
|
|
|
- <td :title="requirement.content" class="d-inline-block text-truncate" style="max-width: 300px;">@{{ requirement.content }}</td>
|
|
|
+ <td :title="requirement.content" class="text-truncate" style="max-width: 300px;">@{{
|
|
|
+ requirement.content }}
|
|
|
+ </td>
|
|
|
<td><span :class="calStatusClass(requirement.status)">@{{ requirement.status }}</span></td>
|
|
|
+ <td>
|
|
|
+ <div v-if="requirement.workers.length>0 && requirement.showMore"
|
|
|
+ class="text-overflow-warp-200 up" :id="'route-'+i">
|
|
|
+ <p v-for="worker in requirement.workers">
|
|
|
+ @{{ worker.name}}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="text-overflow-warp-200 " v-else>
|
|
|
+ @{{ requirement.workers.length>0? requirement.workers[0].name:'' }}
|
|
|
+ </div>
|
|
|
+ <div @click="requirement.showMore=!requirement.showMore" v-if="requirement.workers.length > 1">
|
|
|
+ <label class="text-center mt-0 p-0 cursor-pointer pull-left">
|
|
|
+ <span class="fa"
|
|
|
+ :class="requirement.showMore ? 'fa-angle-double-down' : 'fa-angle-double-right'"></span>
|
|
|
+ <span v-if="requirement.showMore">收起</span><span
|
|
|
+ v-else>展开</span> @{{ requirement.workers.length }} 条
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
<td>@{{ requirement.began_at }}</td>
|
|
|
<td>@{{ requirement.finished_at }}</td>
|
|
|
+ <td>@{{ requirement.reviewed_at }}</td>
|
|
|
<td>@{{ requirement.created_at }}</td>
|
|
|
<td>
|
|
|
- <form v-if="requirement.status!=='已完成'" :action="targetUrl(requirement.id)" method="post"
|
|
|
+ <form v-if="requirement.status==='待接收'" :action="targetUrl(requirement.id)" method="post"
|
|
|
style="display: inline-block;"
|
|
|
onsubmit="return confirm('您确定要删除吗?');">
|
|
|
{{ csrf_field() }}
|
|
|
@@ -31,14 +53,6 @@
|
|
|
<i class="far fa-trash-alt"></i> 删
|
|
|
</button>
|
|
|
</form>
|
|
|
- <form v-if="requirement.status==='已发布'" :action="targetUrl(requirement.id)+'/edit'" method="get"
|
|
|
- style="display: inline-block;"
|
|
|
- onsubmit="return">
|
|
|
- <button type="submit" class="btn btn-outline-info btn-sm">
|
|
|
- <i class="far fa-trash-alt"></i> 改
|
|
|
- </button>
|
|
|
- </form>
|
|
|
-
|
|
|
<button type="submit" class="btn btn-outline-info btn-sm">
|
|
|
<i class="far fa-trash-alt"></i> <a :href="targetUrl(requirement.id)">查</a>
|
|
|
</button>
|
|
|
@@ -109,6 +123,12 @@
|
|
|
type: 'dateTime',
|
|
|
tip: '选择任务开始的截止时间'
|
|
|
},
|
|
|
+ {
|
|
|
+ name: 'requirement_id',
|
|
|
+ type: 'input',
|
|
|
+ tip: '输入任务号',
|
|
|
+ placeholder: '任务号',
|
|
|
+ },
|
|
|
|
|
|
],
|
|
|
[
|
|
|
@@ -131,6 +151,19 @@
|
|
|
name: 'created_at_end',
|
|
|
type: 'dateTime',
|
|
|
tip: '选择任务创建的截止时间'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'status',
|
|
|
+ type: 'select',
|
|
|
+ tip: '选择状态',
|
|
|
+ placeholder: '状态',
|
|
|
+ data:[
|
|
|
+ {name:'待接收',value:'待接收'},
|
|
|
+ {name:'开发中',value:'开发中'},
|
|
|
+ {name:'待验收',value:'待验收'},
|
|
|
+ {name:'验收通过',value:'验收通过'},
|
|
|
+ {name:'验收未通过',value:'验收未通过'},
|
|
|
+ ]
|
|
|
}
|
|
|
]
|
|
|
];
|
|
|
@@ -140,14 +173,17 @@
|
|
|
});
|
|
|
_this.form.init();
|
|
|
let column = [
|
|
|
- {name: 'index', value: '序号', neglect: true},
|
|
|
+ // {name: 'index', value: '序号', neglect: true},
|
|
|
+ {name: 'requirement_id', value: '任务号'},
|
|
|
{name: 'creator_name', value: '创建人'},
|
|
|
{name: 'score', value: '分数'},
|
|
|
{name: 'title', value: '标题'},
|
|
|
{name: 'content', value: '内容'},
|
|
|
{name: 'status', value: '状态'},
|
|
|
- {name: 'began_at', value: '开始时间'},
|
|
|
+ {name: 'workers', value: '完成人'},
|
|
|
+ {name: 'began_at', value: '接收时间'},
|
|
|
{name: 'finished_at', value: '完成时间'},
|
|
|
+ {name: 'reviewed_at', value: '验收时间'},
|
|
|
{name: 'created_at', value: '创建时间'},
|
|
|
{name: 'operation', value: '操作'},
|
|
|
];
|
|
|
@@ -159,25 +195,28 @@
|
|
|
restorationColumn: 'addtime',
|
|
|
fixedTop: ($('#form_div').height()) + ($('#btn').height()) + 1,
|
|
|
}).init();
|
|
|
-
|
|
|
+ _this.requirements = _this.requirements.map(item => {
|
|
|
+ item.showMore = false
|
|
|
+ return item;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
- {{--edit(id) {--}}
|
|
|
- {{-- location.href = "{{url('finance/settlementBills/ownerSundryFeeDetails')}}/" + id + "/edit";--}}
|
|
|
- {{--},--}}
|
|
|
targetUrl(id) {
|
|
|
return "{{ url('requirements') }}/" + id;
|
|
|
},
|
|
|
|
|
|
calStatusClass(status) {
|
|
|
switch (status) {
|
|
|
- case '已发布':
|
|
|
- return "badge badge-info";
|
|
|
- case '已开始':
|
|
|
+ case '待接收':
|
|
|
+ return "badge badge-primary";
|
|
|
+ case '开发中':
|
|
|
return "badge badge-warning";
|
|
|
- case '已完成':
|
|
|
+ case '待验收':
|
|
|
+ return "badge badge-info";
|
|
|
+ case '验收通过':
|
|
|
return "badge badge-success";
|
|
|
-
|
|
|
+ case '验收未通过':
|
|
|
+ return "badge badge-danger";
|
|
|
}
|
|
|
}
|
|
|
},
|