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