|
|
|
@ -39,6 +39,18 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="bottom-list">
|
|
|
|
|
<h3 class="top-title">传播数据</h3>
|
|
|
|
|
<el-form :inline="true" size="small">
|
|
|
|
|
<el-form-item label="员工">
|
|
|
|
|
<el-input clearable v-model="form.userName" placeholder="请输入"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="部门">
|
|
|
|
|
<el-input clearable v-model="form.departmentName" placeholder="请输入"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="onSearch">搜索</el-button>
|
|
|
|
|
<el-button @click="reset">重置</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-table :data="transformList" size="default" border style="width: 1300px">
|
|
|
|
|
<el-table-column prop="userName" label="员工姓名" width="160"></el-table-column>
|
|
|
|
|
<el-table-column prop="departmentName" label="部门" width="240"></el-table-column>
|
|
|
|
@ -57,30 +69,55 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<el-pagination
|
|
|
|
|
v-model:currentPage="pagination.current"
|
|
|
|
|
v-model:page-size="pagination.pageSize"
|
|
|
|
|
:page-sizes="[10, 20, 30, 40]"
|
|
|
|
|
background
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
:total="pagination.total"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {defineComponent, reactive, ref, getCurrentInstance} from 'vue'
|
|
|
|
|
import {defineComponent, reactive, ref,watch, getCurrentInstance} from 'vue'
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
name: 'v-transformResult',
|
|
|
|
|
setup() {
|
|
|
|
|
const activeId = reactive({
|
|
|
|
|
value: 0
|
|
|
|
|
});
|
|
|
|
|
const form = reactive({
|
|
|
|
|
userName: undefined,
|
|
|
|
|
departmentName: undefined,
|
|
|
|
|
});
|
|
|
|
|
const transformData = ref({});
|
|
|
|
|
const transformList = ref([]);
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
const pagination = reactive({
|
|
|
|
|
total: 0,
|
|
|
|
|
current: 1,
|
|
|
|
|
pageSize: 10
|
|
|
|
|
});
|
|
|
|
|
return {
|
|
|
|
|
proxy,
|
|
|
|
|
proxy,form,
|
|
|
|
|
transformData,transformList,
|
|
|
|
|
activeId
|
|
|
|
|
activeId,pagination
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
activated() {
|
|
|
|
|
this.getApi();
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
watch(() => (this.pagination.pageSize), () => {
|
|
|
|
|
this.getApi()
|
|
|
|
|
});
|
|
|
|
|
watch(() => (this.pagination.current), () => {
|
|
|
|
|
this.getApi()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// created() {
|
|
|
|
|
// this.getApi();
|
|
|
|
|
// },
|
|
|
|
@ -91,15 +128,25 @@ export default defineComponent({
|
|
|
|
|
const data = res.data;
|
|
|
|
|
this.transformData = data;
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
this.proxy.$post("/task/taskEffectData", {id: this.$route.query.id}).then(res => {
|
|
|
|
|
let obj = Object.assign(this.form , {id: this.$route.query.id,pageNum: this.pagination.current, pageSize: this.pagination.pageSize})
|
|
|
|
|
this.proxy.$post("/task/taskEffectData", obj).then(res => {
|
|
|
|
|
const data = res.data;
|
|
|
|
|
this.transformList = data;
|
|
|
|
|
this.transformList = data.records;
|
|
|
|
|
this.pagination.total = data.total;
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
goDetail(value) {
|
|
|
|
|
this.$router.push({ name: "TransformResultDetail", query:{id:this.$route.query.id, userId: value}})
|
|
|
|
|
},
|
|
|
|
|
onSearch() {
|
|
|
|
|
this.getApi()
|
|
|
|
|
},
|
|
|
|
|
reset() {
|
|
|
|
|
this.form.userName = undefined;
|
|
|
|
|
this.form.departmentName = undefined;
|
|
|
|
|
this.getApi();
|
|
|
|
|
},
|
|
|
|
|
//导出
|
|
|
|
|
download() {
|
|
|
|
|
this.proxy.$download("/task/excel", {id: this.$route.query.id}, this.transformData.taskTitle+'传播效果.xlsx').then(res => {
|
|
|
|
|