|
|
|
@ -1,7 +1,13 @@ |
|
|
|
<template> |
|
|
|
<div class="mod-config"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;"> |
|
|
|
<el-button @click="getData()" type="primary" style="margin-left: 2px;margin-top: 33px">查询</el-button> |
|
|
|
<el-form-item > |
|
|
|
<span slot="label" style="" @click="getBaseList(1031,3)"><a herf="#">工厂编码</a></span> |
|
|
|
<el-input v-model="searchData.site" style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button @click="search()" type="primary" style="margin-left: 2px;margin-top: 33px">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<el-table |
|
|
|
@ -14,6 +20,7 @@ |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="150" |
|
|
|
fixed="right" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</a> |
|
|
|
@ -38,6 +45,17 @@ |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
<el-pagination |
|
|
|
@size-change="sizeChangeHandle" |
|
|
|
@current-change="currentChangeHandle" |
|
|
|
:current-page="pageIndex" |
|
|
|
:page-sizes="[20, 50, 100, 1000]" |
|
|
|
:page-size="pageSize" |
|
|
|
:total="totalPage" |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -47,17 +65,34 @@ |
|
|
|
getTableDefaultListLanguage, |
|
|
|
getTableUserListLanguage, |
|
|
|
} from "@/api/table.js" |
|
|
|
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' |
|
|
|
|
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
import { } from "@/api/table.js" |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
Chooselist |
|
|
|
}, |
|
|
|
name: "null", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
|
|
|
|
searchData:{ |
|
|
|
page: 1, |
|
|
|
limit: 10, |
|
|
|
}, |
|
|
|
height: 200, |
|
|
|
dataList:[], |
|
|
|
dataListLoading: false, |
|
|
|
|
|
|
|
// 导出 start |
|
|
|
exportData: [], |
|
|
|
exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
|
exportHeader: ["项目清单"], |
|
|
|
exportFooter: [], |
|
|
|
exportList:[], |
|
|
|
tagNo:'', |
|
|
|
tagNo2:'', |
|
|
|
pageIndex: 1, |
|
|
|
pageSize: 100, |
|
|
|
totalPage: 0, |
|
|
|
// 导出 end |
|
|
|
columnList1: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -330,6 +365,95 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取基础数据列表S |
|
|
|
getBaseList (val, type) { |
|
|
|
this.tagNo = val |
|
|
|
this.tagNo2 = type |
|
|
|
this.$nextTick(() => { |
|
|
|
let strVal = '' |
|
|
|
if (val === 26) { |
|
|
|
if(type==1) { |
|
|
|
strVal = this.saveHeaderData.operatorId |
|
|
|
}else if(type==2){ |
|
|
|
strVal = this.saveHeaderData.operatorId2 |
|
|
|
}else { |
|
|
|
strVal = this.searchData.operatorName |
|
|
|
} |
|
|
|
} |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
}) |
|
|
|
}, |
|
|
|
/* 列表方法的回调 */ |
|
|
|
getBaseData (val) { |
|
|
|
if (this.tagNo === 26) { |
|
|
|
if(this.tagNo2==1) { |
|
|
|
this.saveHeaderData.operatorId = val.OperatorID |
|
|
|
this.saveHeaderData.operatorName = val.OperatorName |
|
|
|
}else if(this.tagNo2==2){ |
|
|
|
this.saveHeaderData.operatorId2 = val.OperatorID |
|
|
|
this.saveHeaderData.operatorIdName2 = val.OperatorName |
|
|
|
}else { |
|
|
|
this.searchData.operatorName = val.OperatorName |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
//导出excel |
|
|
|
async createExportData() { |
|
|
|
this.searchData.limit = -1 |
|
|
|
this.searchData.page = 1 |
|
|
|
await eamWorkPlanSearch(this.searchData).then(({data}) => { |
|
|
|
this.exportList= data.page.list; |
|
|
|
}) |
|
|
|
|
|
|
|
return this.exportList; |
|
|
|
}, |
|
|
|
startDownload() { |
|
|
|
// this.exportData = this.dataList |
|
|
|
|
|
|
|
}, |
|
|
|
finishDownload() { |
|
|
|
|
|
|
|
}, |
|
|
|
fields() { |
|
|
|
let json = "{" |
|
|
|
this.columnList.forEach((item, index) => { |
|
|
|
if (index == this.columnList.length - 1) { |
|
|
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" |
|
|
|
} else { |
|
|
|
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," |
|
|
|
} |
|
|
|
}) |
|
|
|
json += "}" |
|
|
|
let s = eval("(" + json + ")") |
|
|
|
|
|
|
|
return s |
|
|
|
}, |
|
|
|
// 导出 end |
|
|
|
// 获取数据列表 |
|
|
|
search () { |
|
|
|
this.searchData.limit = this.pageSize |
|
|
|
this.searchData.page = this.pageIndex |
|
|
|
eamWorkPlanSearch(this.searchData).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.dataList = data.page.list |
|
|
|
this.pageIndex = data.page.currPage |
|
|
|
this.pageSize = data.page.pageSize |
|
|
|
this.totalPage = data.page.totalCount |
|
|
|
} |
|
|
|
this.dataListLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 每页数 |
|
|
|
sizeChangeHandle (val) { |
|
|
|
this.pageSize = val |
|
|
|
this.pageIndex = 1 |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
// 当前页 |
|
|
|
currentChangeHandle (val) { |
|
|
|
this.pageIndex = val |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
// 动态列开始 获取 用户保存的 格式列 |
|
|
|
async getTableUserColumn(tableId, columnId) { |
|
|
|
let queryTableUser = { |
|
|
|
@ -389,7 +513,7 @@ |
|
|
|
// break; |
|
|
|
} |
|
|
|
} else { |
|
|
|
// this.showDefault = true |
|
|
|
// this.showDefault = true. |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|