fix : 组件示例
This commit is contained in:
11295
package-lock.json
generated
11295
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,90 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
|
||||||
|
<fvTable ref="tableIns" :tableConfig="tableConfig" :data="mockData" @headBtnClick="headBtnClick"></fvTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup lang="jsx">
|
||||||
export default {
|
|
||||||
name: "index"
|
const router = useRouter()
|
||||||
|
const tableIns = ref()
|
||||||
|
const mockData=ref([
|
||||||
|
{
|
||||||
|
workOrderNumber:1211,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
workOrderNumber:232,
|
||||||
|
},
|
||||||
|
])
|
||||||
|
const auths = reactive({
|
||||||
|
report: ['mosr:collect:reported'],
|
||||||
|
})
|
||||||
|
const searchConfig = reactive([
|
||||||
|
{
|
||||||
|
label: '工单号',
|
||||||
|
prop: 'requirementName',
|
||||||
|
props: {
|
||||||
|
placeholder: '请输入工单号查询',
|
||||||
|
clearable: true,
|
||||||
|
checkStrictly: true
|
||||||
|
},
|
||||||
|
component: 'el-input',
|
||||||
|
},
|
||||||
|
])
|
||||||
|
const tableConfig = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
prop: 'index',
|
||||||
|
type: 'index',
|
||||||
|
label: '序号',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'workOrderNumber',
|
||||||
|
label: '工单号',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'oper',
|
||||||
|
label: '操作',
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 150,
|
||||||
|
showOverflowTooltip: false,
|
||||||
|
currentRender: ({row, index}) => {
|
||||||
|
let btn = []
|
||||||
|
btn.push({label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary'})
|
||||||
|
return (
|
||||||
|
<div style={{width: '100%'}}>
|
||||||
|
{
|
||||||
|
btn.map(item => (
|
||||||
|
<el-button
|
||||||
|
type={item.type}
|
||||||
|
// v-perm={item.prem}
|
||||||
|
onClick={() => item.func()}
|
||||||
|
link
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</el-button>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
api: '',
|
||||||
|
params: {},
|
||||||
|
btns: [
|
||||||
|
// {name: '新增', key: 'add', color: '#DED0B2', auth: auths.report},
|
||||||
|
]
|
||||||
|
})
|
||||||
|
const headBtnClick = (key) => {
|
||||||
|
switch (key) {
|
||||||
|
case 'add':
|
||||||
|
handleAdd()
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
历史工单
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
待处理工单
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user