<template>
|
<FYTable @search="onSearch">
|
<template #options> </template>
|
|
<template #buttons> </template>
|
|
<template #table-column>
|
<el-table-column
|
fixed="left"
|
sortable
|
prop="ncNum"
|
label="编号"
|
width="100"
|
>
|
</el-table-column>
|
<el-table-column
|
fixed="left"
|
prop="ncItemName"
|
label="项目名称"
|
:show-overflow-tooltip="true"
|
width="400"
|
>
|
</el-table-column>
|
<!-- <el-table-column prop="ncItemUnit" label="业主单位" width="130" /> -->
|
<!-- <el-table-column prop="ncProvinceName" label="省" width="90" />
|
<el-table-column prop="ncCityName" label="市" width="90" /> -->
|
<!-- <el-table-column prop="ncDistrictName" label="区县" width="90" /> -->
|
<!-- <el-table-column prop="townname" label="街道" width="110" /> -->
|
<el-table-column
|
prop="ncConstructionUnit"
|
label="施工单位"
|
min-width="100"
|
/>
|
<el-table-column prop="ncPerson" label="申请人" width="110" />
|
<el-table-column prop="ncApplyContent" label="申请内容" width="110" />
|
<el-table-column prop="ncStartDate" label="工期开始" width="110">
|
<template #default="{ row }">
|
{{ $fm.formatYMD(row.ncStartDate) }}
|
</template>
|
</el-table-column>
|
<el-table-column prop="ncEndDate" label="工期结束" width="110">
|
<template #default="{ row }">
|
{{ $fm.formatYMD(row.ncEndDate) }}
|
</template>
|
</el-table-column>
|
<!-- <el-table-column prop="ncCreateTime" label="申请时间" width="110" >
|
<template #default="{row}">
|
{{ $fm.formatYMD(row.ncCreateTime) }}
|
</template>
|
</el-table-column> -->
|
<el-table-column prop="ncUserId" label="匹配用户" width="110">
|
<template #default="{ row }">
|
<el-text v-loading="row._loading">{{
|
row._user ? row._user.realName : '未匹配'
|
}}</el-text>
|
</template>
|
</el-table-column>
|
<el-table-column fixed="right" label="操作" width="160">
|
<template #default="scope">
|
<el-button
|
:loading="scope.row.loading1"
|
type="default"
|
size="small"
|
@click="itemEdit(scope)"
|
>编辑</el-button
|
>
|
<el-button
|
:loading="scope.row.loading2"
|
:type="scope.row.extension1 != '0' ? 'danger' : 'primary'"
|
size="small"
|
@click="itemActive(scope)"
|
>{{ scope.row.extension1 != '0' ? '下线' : '上线' }}</el-button
|
>
|
</template>
|
</el-table-column>
|
</template>
|
</FYTable>
|
</template>
|
<script setup>
|
import { ref } from 'vue';
|
import nightConstructionApi from '@/api/fysp/nightConstructionApi';
|
import userApi from '@/api/fysp/userApi';
|
|
const data = ref([]);
|
|
function onSearch(page, callback) {
|
return nightConstructionApi
|
.fetchRecord({
|
cityCode: '3100',
|
districtCode: '310106',
|
page: page.currentPage,
|
perPage: page.pageSize
|
})
|
.then((res) => {
|
if (res.success) {
|
res.data.forEach((d) => {
|
res.data._loading = true;
|
userApi.getUserById(d.ncUserId).then((res1) => {
|
res.data._user = res1;
|
});
|
});
|
callback({
|
data: res.data,
|
total: res.head.totalCount
|
});
|
}
|
});
|
}
|
</script>
|