You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
4.8 KiB
98 lines
4.8 KiB
import formatter from './formatter.js'
|
|
|
|
// 自定义模板内容-打印状态
|
|
const PrefixPlusPrintState = {
|
|
props: ['value'],
|
|
template: `
|
|
<el-tag v-if="value >= 1" type="success">已打印</el-tag>
|
|
<el-tag v-else type="primary">未打印</el-tag>
|
|
`
|
|
}
|
|
|
|
// 自定义模板内容-缴费状态
|
|
const PrefixPlusJfState = {
|
|
props: ['value'],
|
|
template: `
|
|
<el-tag v-if="value >= 1" type="success">已交费</el-tag>
|
|
<el-tag v-else type="danger">未交费</el-tag>
|
|
`
|
|
}
|
|
|
|
const data = {
|
|
MyTask: [
|
|
{ prop: 'shebeizhonglei', label: '设备种类', align: 'center' },
|
|
{ prop: 'jianyanleibie', label: '检验类别', align: 'center', formatter: formatter.formatterCategory },
|
|
{ prop: 'shiyongdengjibianhao', label: '使用登记证号', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'zhucedaima', label: '注册代码', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'shebeimingcheng', label: '产品名称/设备名称', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'chanpinbianhao', label: '产品编号/出厂编号', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'shiyongdanwei', label: '使用单位', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'zhizaodanwei', label: '制造单位', align: 'center', showOverflowTooltip: true }
|
|
],
|
|
TODOYsjl: [
|
|
{ prop: 'jilubianhao', label: '记录编号', align: 'center' },
|
|
{ prop: 'neibuleibie', label: '检验类别', align: 'center', formatter: formatter.formatterCategory },
|
|
{ prop: 'shebeizhonglei', label: '设备种类', align: 'center' },
|
|
{ prop: 'shebeipinzhong', label: '设备品种', align: 'center' },
|
|
{ prop: 'shiyongdengjibianhao', label: '使用登记证号', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'zhucedaima', label: '注册代码', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'zhizaodanwei', label: '制造单位', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'chanpinbianhao', label: '产品编号/出厂编号', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'shebeimingcheng', label: '产品名称', align: 'center' },
|
|
{ prop: 'guigexinghao', label: '设备型号', align: 'center' }
|
|
],
|
|
TODOReport: [
|
|
{ prop: 'baogaobianhao', label: '报告编号', align: 'center' },
|
|
{ prop: 'neibuleibie', label: '检验类别', align: 'center', formatter: formatter.formatterCategory },
|
|
{ prop: 'shiyongdengjibianhao', label: '使用登记证号', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'zhucedaima', label: '注册代码', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'shiyongdanwei', label: '使用单位', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'shebeimingcheng', label: '产品名称/设备名称', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'chanpinbianhao', label: '产品编号/出厂编号', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'zhizaodanwei', label: '制造单位', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'jianyanrenyuan', label: '检验人员', align: 'center', formatter: formatter.getChineseName },
|
|
{ prop: 'jianyanjieshuriqi', label: '检验日期', align: 'center' }
|
|
],
|
|
PrintReport: [
|
|
{ prop: 'baogaobianhao', label: '报告编号', align: 'center' },
|
|
{ prop: 'neibuleibie', label: '检验类别', align: 'center', formatter: formatter.formatterCategory },
|
|
{ prop: 'shiyongdengjibianhao', label: '使用登记证号', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'zhucedaima', label: '注册代码', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'shiyongdanwei', label: '使用单位', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'shebeimingcheng', label: '产品名称/设备名称', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'chanpinbianhao', label: '产品编号/出厂编号', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'zhizaodanwei', label: '制造单位', align: 'center', showOverflowTooltip: true },
|
|
{ prop: 'jianyanrenyuan', label: '检验人员', align: 'center', formatter: formatter.getChineseName },
|
|
{ prop: 'jianyanjieshuriqi', label: '检验日期', align: 'center' },
|
|
{ prop: 'printState', label: '打印状态', align: 'center', component: PrefixPlusPrintState },
|
|
{ prop: 'jfState', label: '交费状态', align: 'center', component: PrefixPlusJfState }
|
|
]
|
|
}
|
|
|
|
//, component: PrefixPlusJfState
|
|
|
|
function getColumnArry(type) {
|
|
let array
|
|
switch (type) {
|
|
case 'MyTask':
|
|
array = data.MyTask
|
|
break
|
|
case 'TODOYsjl':
|
|
array = data.TODOYsjl
|
|
break
|
|
case 'TODOReport':
|
|
array = data.TODOReport
|
|
break
|
|
case 'PrintReport':
|
|
array = data.PrintReport
|
|
break
|
|
default:
|
|
array = []
|
|
break
|
|
}
|
|
return array
|
|
}
|
|
|
|
export {
|
|
getColumnArry
|
|
}
|
|
|