|
|
@ -60,6 +60,7 @@
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item style="float: right" >
|
|
|
|
<el-form-item style="float: right" >
|
|
|
|
<el-button type="success" @click="initList">查询</el-button>
|
|
|
|
<el-button type="success" @click="initList">查询</el-button>
|
|
|
|
|
|
|
|
<el-button type="success" @click="exportXls">导出</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
@ -134,6 +135,8 @@ import {null2str} from "@/utils/rpkj";
|
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
|
import { startLoading, endLoading } from '@/utils'
|
|
|
|
import { startLoading, endLoading } from '@/utils'
|
|
|
|
import { Message } from 'element-ui'
|
|
|
|
import { Message } from 'element-ui'
|
|
|
|
|
|
|
|
import * as XLSX from 'xlsx'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name:'Czzjgz',
|
|
|
|
name:'Czzjgz',
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
@ -189,7 +192,7 @@ export default {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
tableColumn: [
|
|
|
|
tableColumn: [
|
|
|
|
|
|
|
|
{ type: 'checkbox', width: 40 },
|
|
|
|
{ type: 'seq', width: 40, title: '序号' },
|
|
|
|
{ type: 'seq', width: 40, title: '序号' },
|
|
|
|
{
|
|
|
|
{
|
|
|
|
field: 'DC_CH',
|
|
|
|
field: 'DC_CH',
|
|
|
@ -310,15 +313,6 @@ export default {
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
filterRender: { name: 'FilterCombination' }
|
|
|
|
filterRender: { name: 'FilterCombination' }
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -333,7 +327,36 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
exportXls(){
|
|
|
|
|
|
|
|
const data=this.$refs.xGrid.getCheckboxRecords()
|
|
|
|
|
|
|
|
if (data.length===0){
|
|
|
|
|
|
|
|
this.$message.warning('请先选择要导出excel的数据')
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const {fullColumn:column}=this.$refs.xGrid.getTableColumn()
|
|
|
|
|
|
|
|
console.log(column)
|
|
|
|
|
|
|
|
const fields={}
|
|
|
|
|
|
|
|
for (const item of column) {
|
|
|
|
|
|
|
|
const name=item.field;
|
|
|
|
|
|
|
|
const value=item.title
|
|
|
|
|
|
|
|
fields[name]=value
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const printData=[]
|
|
|
|
|
|
|
|
data.forEach((item,index)=>{
|
|
|
|
|
|
|
|
const _item={}
|
|
|
|
|
|
|
|
for (const i in fields) {
|
|
|
|
|
|
|
|
_item[fields[i]]=item[i]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
_item.序号=index+1
|
|
|
|
|
|
|
|
printData.push(_item)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
const workBook = XLSX.utils.book_new();
|
|
|
|
|
|
|
|
const sheet = XLSX.utils.json_to_sheet(printData)
|
|
|
|
|
|
|
|
XLSX.utils.book_append_sheet(workBook, sheet, "sheetName");
|
|
|
|
|
|
|
|
const date=XEUtils.toDateString(new Date(),'yyyyMMdd')
|
|
|
|
|
|
|
|
XLSX.writeFile(workBook, `质量跟踪${date}.xlsx`)
|
|
|
|
|
|
|
|
},
|
|
|
|
cellClickEvent({row}) {
|
|
|
|
cellClickEvent({row}) {
|
|
|
|
this.queryParam.dcch = row.cbbm
|
|
|
|
this.queryParam.dcch = row.cbbm
|
|
|
|
this.$refs.xDown4.hidePanel()
|
|
|
|
this.$refs.xDown4.hidePanel()
|
|
|
@ -408,7 +431,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
initBase(){
|
|
|
|
initBase(){
|
|
|
|
getPgdBase({}).then(res=>{
|
|
|
|
getPgdBase({}).then(res=>{
|
|
|
|
console.log(res.data)
|
|
|
|
|
|
|
|
this.dictData = res.data
|
|
|
|
this.dictData = res.data
|
|
|
|
this.projectData=res.data.cbbm
|
|
|
|
this.projectData=res.data.cbbm
|
|
|
|
this.projectData1=res.data.cbbm
|
|
|
|
this.projectData1=res.data.cbbm
|
|
|
@ -523,18 +545,15 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
initList() {
|
|
|
|
initList() {
|
|
|
|
// if (this.queryParam.dcch === '') {
|
|
|
|
if (this.queryParam.dcch === '') {
|
|
|
|
// this.$message.warning('选择船只编号')
|
|
|
|
this.$message.warning('选择船只编号')
|
|
|
|
// return
|
|
|
|
return
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
czzjList(this.queryParam).then((res) => {
|
|
|
|
czzjList(this.queryParam).then((res) => {
|
|
|
|
console.log(res.data)
|
|
|
|
|
|
|
|
this.list = res.data
|
|
|
|
this.list = res.data
|
|
|
|
if (this.$refs.xGrid) {
|
|
|
|
if (this.$refs.xGrid) {
|
|
|
|
this.$refs.xGrid.loadData(this.list)
|
|
|
|
this.$refs.xGrid.loadData(this.list)
|
|
|
|
console.log(this.list)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
selectChange(row) {
|
|
|
|
selectChange(row) {
|
|
|
|