| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <template>
- <basic-container>
- <avue-crud :option="option"
- :data="dataList"
- ref="crud"
- v-model="form"
- :page.sync="page"
- :search.sync="search"
- :table-loading="loading"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
- <template slot="flagSearch">
- <el-select v-model="search.flag" placeholder="" >
- <el-option
- v-for="item in flagOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </template>
- </avue-crud>
- </basic-container>
- </template>
- <script>
- import option from "./config/mainList.json";
- import clientOption from "./config/clientList.json";
- import { performanceAnalysis } from "@/api/workManagement/mainProject";
- import _ from "lodash";
- export default {
- data() {
- return {
- loading : false,
- form: {},
- search:{},
- detailData:{},
- option: option,
- parentId:0,
- dataList: [],
- flagOptions:[{
- value: '1',
- label: '制单人'
- }, {
- value: '2',
- label: '客户'
- }],
- page: {
- pageSize: 10,
- pagerCount: 5,
- total: 0,
- },
- query:{},
- configuration:{
- multipleChoices:false,
- multiple:false,
- disabled:false,
- searchShow:true,
- collapseTags:false,
- clearable:true,
- placeholder:'请点击右边按钮选择',
- dicData:[]
- },
- breakConfiguration:{
- multipleChoices:false,
- multiple:false,
- disabled:false,
- searchShow:true,
- collapseTags:false,
- clearable:true,
- placeholder:'请点击右边按钮选择',
- dicData:[]
- },
- }
- },
- created() {
- },
- mounted() {
- // option.height = window.innerHeight - 200 ;
- },
- methods: {
- //新单打开
- addReceipt(row){
- console.log(1)
- },
- //编辑打开
- editOpen(row){
- console.log(1)
- },
- searchReset() {
- console.log('1')
- },
- selectionChange() {
- console.log('1')
- },
- sizeChange() {
- console.log('1')
- },
- currentChange(val) {
- this.page.currentPage = val
- },
- refreshChange(params) {
- this.onLoad(this.page,params);
- },
- //点击搜索按钮触发
- searchChange(params) {
- this.onLoad(this.page, params);
- },
- paramsAdjustment(params) {
- params = Object.assign({}, this.search);
- if(!params.flag){
- params.flag = 1
- }
- if(!params.year){
- params.year = 2021
- }
- return params
- },
- onLoad(page, params) {
- this.loading = true;
- params = this.paramsAdjustment(params)
- performanceAnalysis(page.currentPage, page.pageSize,params).then(res=>{
- this.dataList = res.data.data.records
- this.page.total = res.data.data.total
- }).finally(()=>{
- this.loading = false;
- })
- },
- }
- }
- </script>
- <style scoped>
- </style>
|