|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<Spin v-if="saving" fix>加载中...</Spin>
|
|
|
|
|
<Form ref="formValidate" :model="formValidate" :label-width="80">
|
|
|
|
|
<Row>
|
|
|
|
|
<i-col span="6">
|
|
|
|
@ -63,7 +64,12 @@
|
|
|
|
|
</i-col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row style="margin-top:50px">
|
|
|
|
|
<Table border :columns="columns1" :data="data"></Table>
|
|
|
|
|
<Table
|
|
|
|
|
:loading="loading"
|
|
|
|
|
border
|
|
|
|
|
:columns="columns1"
|
|
|
|
|
:data="data"
|
|
|
|
|
></Table>
|
|
|
|
|
<Page
|
|
|
|
|
:total="totalSize"
|
|
|
|
|
:current="pageNum"
|
|
|
|
@ -76,7 +82,12 @@
|
|
|
|
|
></Page>
|
|
|
|
|
</Row>
|
|
|
|
|
</Form>
|
|
|
|
|
<!-- <useTable @dispalyuseModal="dispalyuseModal" :useModal="useModal" :id="id"></useTable>-->
|
|
|
|
|
<useTable
|
|
|
|
|
ref="useTable"
|
|
|
|
|
@doShow="doShow"
|
|
|
|
|
:show="showUse"
|
|
|
|
|
:schedule="activityInstance.scheduleVO"
|
|
|
|
|
></useTable>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -85,6 +96,7 @@ import ActivityManager from "../../services/ActivityManager/ActivityManager";
|
|
|
|
|
import useTable from "./useTable";
|
|
|
|
|
import http from "../../services/CommonHttp";
|
|
|
|
|
import { formatDate } from "../../utils/Common";
|
|
|
|
|
import store from "../../store";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "ActivityPlan",
|
|
|
|
@ -93,13 +105,18 @@ export default {
|
|
|
|
|
useTable,
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
const _this = this;
|
|
|
|
|
return {
|
|
|
|
|
loading: false,
|
|
|
|
|
totalSize: 0,
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
saving: false,
|
|
|
|
|
data: [],
|
|
|
|
|
companyList: [],
|
|
|
|
|
shopList: [],
|
|
|
|
|
showUse: false,
|
|
|
|
|
activityInstance: {},
|
|
|
|
|
formValidate: {
|
|
|
|
|
date: null,
|
|
|
|
|
organizationId: null,
|
|
|
|
@ -131,6 +148,10 @@ export default {
|
|
|
|
|
label: "已结束",
|
|
|
|
|
value: 3,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "已终止",
|
|
|
|
|
value: 4,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
columns1: [
|
|
|
|
|
{
|
|
|
|
@ -215,7 +236,9 @@ export default {
|
|
|
|
|
{
|
|
|
|
|
props: { type: "primary", size: "small" },
|
|
|
|
|
style: { marginRight: "8px" },
|
|
|
|
|
on: { click: () => this.stop(p.row) },
|
|
|
|
|
on: {
|
|
|
|
|
click: () => _this.stop(p.row),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
"终止"
|
|
|
|
|
),
|
|
|
|
@ -223,7 +246,7 @@ export default {
|
|
|
|
|
"Button",
|
|
|
|
|
{
|
|
|
|
|
props: { type: "primary", size: "small" },
|
|
|
|
|
on: { click: () => this.modify(p.row) },
|
|
|
|
|
on: { click: () => _this.modify(p.row) },
|
|
|
|
|
},
|
|
|
|
|
"修改"
|
|
|
|
|
),
|
|
|
|
@ -240,6 +263,9 @@ export default {
|
|
|
|
|
this.searchTable();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
doShow(show) {
|
|
|
|
|
this.showUse = show;
|
|
|
|
|
},
|
|
|
|
|
getCompanyInfo() {
|
|
|
|
|
let that = this;
|
|
|
|
|
let data = {
|
|
|
|
@ -274,8 +300,25 @@ export default {
|
|
|
|
|
this.pageNum = value;
|
|
|
|
|
this.searchTable();
|
|
|
|
|
},
|
|
|
|
|
stop(instance) {
|
|
|
|
|
this.saving = true;
|
|
|
|
|
let _this = this;
|
|
|
|
|
ActivityManager.instanceTerminate({ instanceId: instance.id }, (res) => {
|
|
|
|
|
_this.saving = false;
|
|
|
|
|
if (res.success == undefined || !res.success) {
|
|
|
|
|
that.$Message.error("终止失败!");
|
|
|
|
|
} else {
|
|
|
|
|
_this.searchTable();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
modify(instance) {
|
|
|
|
|
this.activityInstance = instance;
|
|
|
|
|
this.showUse = true;
|
|
|
|
|
store.commit("SET_useData", instance);
|
|
|
|
|
},
|
|
|
|
|
searchTable(params = {}) {
|
|
|
|
|
console.log(this.formValidate.date);
|
|
|
|
|
this.loading = true;
|
|
|
|
|
if (
|
|
|
|
|
this.formValidate.date !== null &&
|
|
|
|
|
this.formValidate.date.length > 0
|
|
|
|
@ -302,6 +345,7 @@ export default {
|
|
|
|
|
const data = res.data.results.this || {};
|
|
|
|
|
this.data = data.list || [];
|
|
|
|
|
this.totalSize = data.total || 0;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|