mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
8c1fa1ae02
commit
ed5cc6fc83
@ -53,25 +53,26 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">申请人</th>
|
||||
<th class="text-center">公告类型</th>
|
||||
<th class="text-center">开始时间</th>
|
||||
<th class="text-center">结束时间</th>
|
||||
<th class="text-center" v-for="(item,index) in newOaWorkflowPoolInfo.formJson"
|
||||
v-if="item.type != 'text' && item.type != 'button' && item.type != 'textarea'">
|
||||
{{item.label}}</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">创建时间</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="pool in newOaWorkflowPoolInfo.pools">
|
||||
<td class="text-center">{{pool.createUserName}}</td>
|
||||
<td class="text-center">{{pool.noticeTypeCdName}}</td>
|
||||
<td class="text-center">{{pool.startTime}}</td>
|
||||
<td class="text-center">{{pool.endTime}}</td>
|
||||
<tr v-for="(pool,index) in newOaWorkflowPoolInfo.pools" :key="pool.id">
|
||||
<td class="text-center">{{pool.create_user_name}}</td>
|
||||
<td class="text-center" v-for="(item1,index1) in newOaWorkflowPoolInfo.formJson"
|
||||
v-if="item1.type != 'text' && item1.type != 'button' && item1.type != 'textarea'">
|
||||
{{pool[item1.key]}}</td>
|
||||
<td class="text-center">{{pool.stateName}}</td>
|
||||
<td class="text-center">{{notice.createTime}}</td>
|
||||
<td class="text-center">{{pool.create_time}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs" v-on:click="_openNewOaWorkflowPoolDetail(pool)">详情
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openNewOaWorkflowPoolDetail(pool)">详情
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
pools: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
formJson: [],
|
||||
conditions: {
|
||||
createUserName: '',
|
||||
startTime: '',
|
||||
@ -23,13 +24,14 @@
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('newOaWorkflowPool', 'witch', function (_value) {
|
||||
$that.newOaWorkflowFormInfo.conditions.flowId = _value.flowId;
|
||||
$that.newOaWorkflowPoolInfo.conditions.flowId = _value.flowId;
|
||||
vc.initDateTime('poolStartTime', function (_value) {
|
||||
$that.newOaWorkflowPoolInfo.conditions.startTime = _value;
|
||||
});
|
||||
vc.initDateTime('poolEndTime', function (_value) {
|
||||
$that.newOaWorkflowPoolInfo.conditions.endTime = _value;
|
||||
});
|
||||
$that._listOaWorkFlowPoolForm();
|
||||
vc.component._listOaWorkflowPools(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
})
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
@ -37,6 +39,25 @@
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listOaWorkFlowPoolForm: function () {
|
||||
var param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 1,
|
||||
flowId: $that.newOaWorkflowPoolInfo.conditions.flowId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/oaWorkflow/queryOaWorkflowForm',
|
||||
param,
|
||||
function (json, res) {
|
||||
let _newOaWorkflowFormInfo = JSON.parse(json);
|
||||
$that.newOaWorkflowPoolInfo.formJson = JSON.parse(_newOaWorkflowFormInfo.data[0].formJson).components;
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_listOaWorkflowPools: function (_page, _rows) {
|
||||
vc.component.newOaWorkflowPoolInfo.conditions.page = _page;
|
||||
vc.component.newOaWorkflowPoolInfo.conditions.row = _rows;
|
||||
@ -45,14 +66,13 @@
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.get('newOaWorkflowPool',
|
||||
'list',
|
||||
vc.http.apiGet('/oaWorkflow/queryOaWorkflowFormData',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _newOaWorkflowPoolInfo = JSON.parse(json);
|
||||
vc.component.newOaWorkflowPoolInfo.total = _newOaWorkflowPoolInfo.total;
|
||||
vc.component.newOaWorkflowPoolInfo.records = _newOaWorkflowPoolInfo.records;
|
||||
vc.component.newOaWorkflowPoolInfo.notices = _newOaWorkflowPoolInfo.notices;
|
||||
vc.component.newOaWorkflowPoolInfo.pools = _newOaWorkflowPoolInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.newOaWorkflowPoolInfo.records,
|
||||
dataCount: vc.component.newOaWorkflowPoolInfo.total,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user