<template>
|
<FYTable @search="onSearch" ref="tableRef">
|
<template #table-column>
|
<el-table-column prop="cpName" label="店铺名称" width="90px" />
|
<el-table-column prop="cpTime" label="时间" :formatter="timeFormatter" width="145px" />
|
<el-table-column prop="cpReason" label="原因" show-overflow-tooltip width="245px" />
|
<el-table-column prop="cpAppeal" label="呼吁" show-overflow-tooltip width="345px" />
|
<el-table-column prop="cpSource" label="来源" width="100px" />
|
<el-table-column prop="cpSceneid" label="cpSceneid" width="150px" />
|
<el-table-column
|
prop="cpMediateTime"
|
label="cpMediateTime"
|
:formatter="timeFormatter"
|
width="145px"
|
/>
|
<el-table-column prop="cpMediateUnit" label="调解单位" width="140px" />
|
<el-table-column prop="cpMediateResult" label="调节结果" width="100px" />
|
<el-table-column prop="cpExtension1" label="cpExtension1" width="120px" />
|
<el-table-column prop="cpExtension2" label="cpExtension2" width="120px" />
|
<el-table-column prop="cpExtension3" label="cpExtension3" width="120px" />
|
<el-table-column prop="cpRemark" label="cpRemark" />
|
|
<el-table-column fixed="right" align="right" label="操作" width="160">
|
<template #header>
|
<el-button icon="DocumentAdd" size="default" type="success" @click="add">新增</el-button>
|
</template>
|
<template #default="scope">
|
<el-button type="primary" size="small" @click="look(scope)">查看</el-button>
|
</template>
|
</el-table-column>
|
</template>
|
</FYTable>
|
</template>
|
|
<script>
|
import dayjs from 'dayjs';
|
import { useDrawer } from '@/composables/drawer.js';
|
export default {
|
props: {
|
tableData: {
|
type: Array,
|
default() {
|
return [];
|
}
|
}
|
},
|
emits: ['newlyAdd', 'look'],
|
data() {
|
return {};
|
},
|
setup() {
|
const { drawer, openDrawer, closeDrawer } = useDrawer();
|
return { drawer, openDrawer, closeDrawer };
|
},
|
mounted() {
|
this.search();
|
},
|
methods: {
|
onSearch(page, func) {
|
func({
|
data: this.tableData,
|
total: this.tableData.length
|
});
|
},
|
search() {
|
this.$nextTick(() => {
|
this.$refs.tableRef.onSearch();
|
});
|
},
|
timeFormatter(row, column, cellValue) {
|
return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss');
|
},
|
|
add() {
|
this.$emit('newlyAdd');
|
},
|
look(scope) {
|
this.$emit('look', scope.row);
|
}
|
}
|
};
|
</script>
|
|
<style scoped></style>
|