mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-26 16:19:44 +08:00
优化代码
This commit is contained in:
parent
b5887c1743
commit
a6090875aa
@ -0,0 +1,98 @@
|
||||
<div>
|
||||
<div class="row margin-top-lg">
|
||||
<div class="col-md-1 padding-r-0">
|
||||
<div class=" border-radius ">
|
||||
<div class="margin-xs-r treeview ">
|
||||
<ul class="list-group text-center border-radius">
|
||||
<li class="list-group-item node-orgTree " v-for="(item,index) in workDetailTaskItemInfo.tasks"
|
||||
:key="index" @click="swatchTaskItemTaskId(item)"
|
||||
:class="{'vc-node-selected':workDetailTaskItemInfo.taskId == item.taskId}">
|
||||
<div>{{item.staffName}}</div>
|
||||
<div>({{vc.dateFormat(item.startTime)}} ~ {{vc.dateFormat(item.endTime)}})</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-11">
|
||||
<div class="margin-top">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">
|
||||
<vc:i18n name="工作内容" namespace="workDetailTaskItem"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<vc:i18n name="完成时间" namespace="workDetailTaskItem"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<vc:i18n name="状态" namespace="workDetailTaskItem"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<vc:i18n name="说明" namespace="workDetailTaskItem"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<vc:i18n name="附件" namespace="workDetailTaskItem"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<vc:i18n name="扣款金额" namespace="workDetailTaskItem"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<vc:i18n name="扣款原因" namespace="workDetailTaskItem"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<vc:i18n name="扣款人" namespace="workDetailTaskItem"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<vc:i18n name="创建时间" namespace="workDetailTaskItem"></vc:i18n>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in workDetailTaskItemInfo.items">
|
||||
<td class="text-left" style="width: 400px;">
|
||||
<div >
|
||||
{{item.content}}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.finishTime}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span v-if="item.state == 'CC'">抄送人已办理</span>
|
||||
<span v-else-if="item.state == 'C'">处理人已办理</span>
|
||||
<span v-else>待处理</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.remark}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div v-if="item.pathUrl">
|
||||
<a :href="item.pathUrl" target="_blank">下载</a>
|
||||
</div>
|
||||
<div v-else> - </div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.deductionMoney}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.deductionReason || '-'}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.deductionPersonName || '-'}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{item.createTime}}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<div class="text-right">
|
||||
<vc:create namespace="workDetailTaskItem" path="frame/paginationPlus"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,80 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
let DEFAULT_PAGE = 1;
|
||||
let DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
workDetailTaskItemInfo: {
|
||||
tasks: [],
|
||||
workId: '',
|
||||
taskId: '',
|
||||
items: []
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('workDetailTaskItem', 'switch', function (_data) {
|
||||
$that.workDetailTaskItemInfo.workId = _data.workId;
|
||||
$that._queryWorkDetailTaskData();
|
||||
});
|
||||
vc.on('workDetailTaskItem', 'paginationPlus', 'page_event',
|
||||
function (_currentPage) {
|
||||
$that._loadWorkDetailTaskData(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('workDetailTaskItem', 'notify', function (_data) {
|
||||
$that._loadWorkDetailTaskData(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
_queryWorkDetailTaskData: function () {
|
||||
let param = {
|
||||
params: {
|
||||
workId: $that.workDetailTaskItemInfo.workId,
|
||||
page: 1,
|
||||
row: 100
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/work.listWorkTask',
|
||||
param,
|
||||
function (json) {
|
||||
let _json = JSON.parse(json);
|
||||
$that.workDetailTaskItemInfo.tasks = _json.data;
|
||||
$that.swatchTaskItemTaskId(_json.data[0]);
|
||||
},
|
||||
function () {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_loadWorkDetailTaskItemData: function () {
|
||||
let param = {
|
||||
params: {
|
||||
workId: $that.workDetailTaskItemInfo.workId,
|
||||
taskId: $that.workDetailTaskItemInfo.taskId,
|
||||
page: 1,
|
||||
row: 100
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/task.listWorkTaskItem',
|
||||
param,
|
||||
function (json) {
|
||||
let _json = JSON.parse(json);
|
||||
$that.workDetailTaskItemInfo.items = _json.data;
|
||||
},
|
||||
function () {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
swatchTaskItemTaskId: function (_task) {
|
||||
$that.workDetailTaskItemInfo.taskId = _task.taskId;
|
||||
$that._loadWorkDetailTaskItemData();
|
||||
},
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
@ -131,6 +131,12 @@
|
||||
<vc:i18n name="处理人" namespace="workDetail"></vc:i18n>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" v-bind:class="{active:workDetailInfo._currentTab == 'workDetailTaskItem'}"
|
||||
v-on:click="changeTab('workDetailTaskItem')">
|
||||
<vc:i18n name="处理内容" namespace="workDetail"></vc:i18n>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" v-bind:class="{active:workDetailInfo._currentTab == 'workDetailCopy'}"
|
||||
v-on:click="changeTab('workDetailCopy')">
|
||||
@ -172,6 +178,9 @@
|
||||
<div v-if="workDetailInfo._currentTab == 'workDetailTask'">
|
||||
<vc:create path="oa/workDetailTask"></vc:create>
|
||||
</div>
|
||||
<div v-if="workDetailInfo._currentTab == 'workDetailTaskItem'">
|
||||
<vc:create path="oa/workDetailTaskItem"></vc:create>
|
||||
</div>
|
||||
<div v-if="workDetailInfo._currentTab == 'workDetailCopy'">
|
||||
<vc:create path="oa/workDetailCopy"></vc:create>
|
||||
</div>
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
<th class="text-center" v-if="workTaskDetailInfo.todo == 'ON'">
|
||||
<vc:i18n name="选择" namespace="workTaskDetail"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<th data-hide="phone" class="text-left">
|
||||
<vc:i18n name="工作单内容" namespace="workTaskDetail"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
@ -179,6 +179,9 @@
|
||||
<th data-hide="phone" class="text-center">
|
||||
<vc:i18n name="时间" namespace="workTaskDetail"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<vc:i18n name="类型" namespace="workTaskDetail"></vc:i18n>
|
||||
</th>
|
||||
<th data-hide="phone" class="text-center">
|
||||
<vc:i18n name="意见" namespace="workTaskDetail"></vc:i18n>
|
||||
</th>
|
||||
@ -199,6 +202,11 @@
|
||||
<td class="text-center">
|
||||
{{event.createTime}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span v-if="event.eventType == '1001'">处理人办理</span>
|
||||
<span v-else-if="event.eventType== '2002'">抄送人办理</span>
|
||||
<span v-else>办理</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{event.remark}}
|
||||
</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user