mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化代码
This commit is contained in:
parent
afccd519f4
commit
c8c1b9ea81
151
public/pages/oa/doWork/doWork.html
Normal file
151
public/pages/oa/doWork/doWork.html
Normal file
@ -0,0 +1,151 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<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 doWorkInfo.states"
|
||||
:key="index" @click="swatchWorkState(item)"
|
||||
:class="{'vc-node-selected':doWorkInfo.conditions.state == item.state}">
|
||||
{{item.name}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-11">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<vc:i18n name="查询条件"></vc:i18n>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('工单名称','doWork')"
|
||||
v-model="doWorkInfo.conditions.workName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('处理人','doWork')"
|
||||
v-model="doWorkInfo.conditions.staffName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('开始时间','doWork')"
|
||||
v-model="doWorkInfo.conditions.queryStartTime" class=" form-control queryStartTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('结束时间','doWork')"
|
||||
v-model="doWorkInfo.conditions.queryEndTime" class=" form-control queryEndTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_queryDoWorkMethod()">
|
||||
<vc:i18n name="查询"></vc:i18n>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<vc:i18n name="办理工作单" namespace="doWork"></vc:i18n>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='编号' namespace='doWork'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='工单名称' namespace='doWork'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='类型名称' namespace='doWork'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='标识' namespace='doWork'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='开始时间' namespace='doWork'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='结束时间' namespace='doWork'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='发起人' namespace='doWork'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='处理人' namespace='doWork'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='抄送人' namespace='doWork'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='状态' namespace='doWork'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='创建时间' namespace='doWork'></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name='操作'></vc:i18n>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="work in doWorkInfo.works">
|
||||
<td class="text-center">{{work.workId}}</td>
|
||||
<td class="text-center">{{work.workName}}</td>
|
||||
<td class="text-center">{{work.typeName}}</td>
|
||||
<td class="text-center">{{work.workCycle == '1001'?'一次性工单':'周期性工单'}}</td>
|
||||
<td class="text-center">{{work.startTime}}</td>
|
||||
<td class="text-center">{{work.endTime}}</td>
|
||||
<td class="text-center">{{work.createUserName}}</td>
|
||||
<td class="text-center">{{work.curStaffName || '-'}}</td>
|
||||
<td class="text-center">{{work.curCopyName || '-'}}</td>
|
||||
<td class="text-center">{{work.stateName}}</td>
|
||||
<td class="text-center">{{work.createTime}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDoWorkModel(work)">
|
||||
<vc:i18n name='办理'></vc:i18n>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
88
public/pages/oa/doWork/doWork.js
Normal file
88
public/pages/oa/doWork/doWork.js
Normal file
@ -0,0 +1,88 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
doWorkInfo: {
|
||||
works: [],
|
||||
states:[{
|
||||
name:'全部',
|
||||
state:''
|
||||
},{
|
||||
name:'待处理',
|
||||
state:'W'
|
||||
},{
|
||||
name:'已处理',
|
||||
state:'C'
|
||||
}],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
wtId: '',
|
||||
conditions: {
|
||||
state:'',
|
||||
typeName: '',
|
||||
timeout: '',
|
||||
queryEndTime:'',
|
||||
queryStartTime:'',
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
$that._listDoWorks(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('doWork', 'listDoWork', function (_param) {
|
||||
$that._listDoWorks(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
$that._listDoWorks(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
vc.initDateTime('queryStartTime',function(_value){
|
||||
$that.doWorkInfo.conditions.queryStartTime = _value;
|
||||
})
|
||||
vc.initDateTime('queryEndTime',function(_value){
|
||||
$that.doWorkInfo.conditions.queryEndTime = _value;
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
_listDoWorks: function (_page, _rows) {
|
||||
$that.doWorkInfo.conditions.page = _page;
|
||||
$that.doWorkInfo.conditions.row = _rows;
|
||||
var param = {
|
||||
params: $that.doWorkInfo.conditions
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/work.queryTaskWork',
|
||||
param,
|
||||
function (json, res) {
|
||||
let _json = JSON.parse(json);
|
||||
$that.doWorkInfo.total = _json.total;
|
||||
$that.doWorkInfo.records = _json.records;
|
||||
$that.doWorkInfo.works = _json.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: $that.doWorkInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openDoWorkModel:function(_work){
|
||||
|
||||
},
|
||||
_queryDoWorkMethod: function () {
|
||||
$that._listDoWorks(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
swatchWorkState:function(_state){
|
||||
$that.doWorkInfo.conditions.state = _state.state;
|
||||
$that._listDoWorks(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user