zx 3 years ago
parent 4ca7c618fc
commit 01eaf7ea42

@ -108,9 +108,11 @@ export default defineComponent({
groupFormatter groupFormatter
} }
}, },
mounted() { activated() {
this.getApi(); this.getApi();
this.getData(); this.getData();
},
mounted() {
watch(() => (this.pagination.pageSize), () => { watch(() => (this.pagination.pageSize), () => {
this.getData() this.getData()
}); });

@ -123,9 +123,13 @@ export default defineComponent({
pagination pagination
} }
}, },
mounted() { activated() {
this.getApi(); this.getApi();
this.getData(); this.getData();
},
mounted() {
// this.getApi();
// this.getData();
watch(() => (this.pagination.pageSize), () => { watch(() => (this.pagination.pageSize), () => {
this.getData() this.getData()
}); });

@ -46,6 +46,9 @@
<el-form-item label="部门"> <el-form-item label="部门">
<el-input clearable v-model="form.departmentName" placeholder="请输入"></el-input> <el-input clearable v-model="form.departmentName" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="时间">
<el-date-picker size="small" value-format="YYYY-MM-DD HH:mm:ss" type="daterange" v-model="selTime" @change="dateRangeChange"></el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSearch"></el-button> <el-button type="primary" @click="onSearch"></el-button>
<el-button @click="reset"></el-button> <el-button @click="reset"></el-button>
@ -92,9 +95,12 @@ export default defineComponent({
const form = reactive({ const form = reactive({
userName: undefined, userName: undefined,
departmentName: undefined, departmentName: undefined,
beginTime: undefined,
endTime: undefined,
}); });
const transformData = ref({}); const transformData = ref({});
const transformList = ref([]); const transformList = ref([]);
const selTime = ref([]);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const pagination = reactive({ const pagination = reactive({
total: 0, total: 0,
@ -102,7 +108,7 @@ export default defineComponent({
pageSize: 10 pageSize: 10
}); });
return { return {
proxy,form, proxy,form,selTime,
transformData,transformList, transformData,transformList,
activeId,pagination activeId,pagination
} }
@ -145,8 +151,17 @@ export default defineComponent({
reset() { reset() {
this.form.userName = undefined; this.form.userName = undefined;
this.form.departmentName = undefined; this.form.departmentName = undefined;
this.form.beginTime = undefined;
this.form.endTime = undefined;
this.selTime = [];
this.getApi(); this.getApi();
}, },
dateRangeChange(value) {
if(value) {
this.form.beginTime = value[0];
this.form.endTime = value[1];
}
},
// //
download() { download() {
this.proxy.$download("/task/excel", {id: this.$route.query.id}, this.transformData.taskTitle+'传播效果.xlsx').then(res => { this.proxy.$download("/task/excel", {id: this.$route.query.id}, this.transformData.taskTitle+'传播效果.xlsx').then(res => {

@ -26,8 +26,8 @@
<div class="area-table"> <div class="area-table">
<el-table :data="tableData.data" size="default" border :header-cell-style="{background: '#EEE'}"> <el-table :data="tableData.data" size="default" border :header-cell-style="{background: '#EEE'}">
<el-table-column prop="userName" label="申请人" width="200"></el-table-column> <el-table-column prop="userName" label="申请人" width="200"></el-table-column>
<el-table-column prop="departmentName" label="部门" width="200"></el-table-column> <el-table-column prop="departmentName" label="部门" width="280"></el-table-column>
<el-table-column prop="platform" label="第三方平台" width="240" :formatter="statusFormatter"></el-table-column> <el-table-column prop="platform" label="第三方平台" width="160" :formatter="statusFormatter"></el-table-column>
<el-table-column prop="account" label="账号" width="200"></el-table-column> <el-table-column prop="account" label="账号" width="200"></el-table-column>
<el-table-column prop="name" label="昵称" width="200"></el-table-column> <el-table-column prop="name" label="昵称" width="200"></el-table-column>
<el-table-column prop="tel" label="手机号" width="200"></el-table-column> <el-table-column prop="tel" label="手机号" width="200"></el-table-column>

@ -83,8 +83,10 @@ export default defineComponent({
statusFormatter statusFormatter
} }
}, },
mounted() { activated() {
this.getData() this.getData()
},
mounted() {
watch(() => (this.pagination.pageSize), () => { watch(() => (this.pagination.pageSize), () => {
this.getData() this.getData()
}); });

Loading…
Cancel
Save