|  |  |  | 
|---|
|  |  |  | <TableLayout :permissions="['business:ywworkorder:query']"> | 
|---|
|  |  |  | <!-- 搜索表单 --> | 
|---|
|  |  |  | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> | 
|---|
|  |  |  | <el-form-item prop="areaType" label="位置类别"> | 
|---|
|  |  |  | <el-form-item prop="areaType" label="位置类型"> | 
|---|
|  |  |  | <el-select v-model="searchForm.areaType"> | 
|---|
|  |  |  | <el-option label="室内维修" value="0"></el-option> | 
|---|
|  |  |  | <el-option label="公共维修" value="1"></el-option> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-option v-for="item in buildList" :label="item.name" :value="item.id" /> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item prop="cateId" label="物品类别"> | 
|---|
|  |  |  | <el-cascader v-model="searchForm.areaIds" @change="changeSel" placeholder="请选择巡检区域" clearable | 
|---|
|  |  |  | <el-form-item prop="cateId" label="工单分类"> | 
|---|
|  |  |  | <el-cascader v-model="searchForm.areaIds" @change="changeSel" placeholder="请选择工单分类" clearable | 
|---|
|  |  |  | :options="cateList" :props="{ | 
|---|
|  |  |  | label: 'name', | 
|---|
|  |  |  | value: 'id', | 
|---|
|  |  |  | children: 'childCategoryList' | 
|---|
|  |  |  | }"></el-cascader> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="提交日期"> | 
|---|
|  |  |  | <el-form-item label="来源" prop="origin"> | 
|---|
|  |  |  | <el-select v-model="searchForm.origin" clearable filterable> | 
|---|
|  |  |  | <el-option label="自建" :value="0" /> | 
|---|
|  |  |  | <el-option label="问题转工单" :value="1" /> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="上报时间"> | 
|---|
|  |  |  | <el-date-picker v-model="searchForm.selDate" @change="changeSelDate" format="yyyy-MM-dd" | 
|---|
|  |  |  | value-format="yyyy-MM-dd" type="daterange"></el-date-picker> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <section> | 
|---|
|  |  |  | <el-button type="primary" @click="search">搜索</el-button> | 
|---|
|  |  |  | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywworkorder:exportExcel']" | 
|---|
|  |  |  | @click="exportExcel">导出</el-button> | 
|---|
|  |  |  | <el-button @click="reset">重置</el-button> | 
|---|
|  |  |  | </section> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | 
|---|
|  |  |  | <ul class="toolbar" v-permissions="['business:ywworkorder:create', 'business:ywworkorder:delete']"> | 
|---|
|  |  |  | <li><el-button type="primary" @click="$refs.operaYwWorkorderWindow.open('新建工单')" icon="el-icon-plus" | 
|---|
|  |  |  | v-permissions="['business:ywworkorder:create']">新建</el-button></li> | 
|---|
|  |  |  | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" | 
|---|
|  |  |  | v-permissions="['business:ywworkorder:delete']">删除</el-button></li> | 
|---|
|  |  |  | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywworkorder:exportExcel']" | 
|---|
|  |  |  | @click="exportExcel" plain>导出</el-button> | 
|---|
|  |  |  | </ul> | 
|---|
|  |  |  | <el-table v-loading="isWorking.search" :data="tableData.list" stripe> | 
|---|
|  |  |  | <el-table-column prop="areaType" label="位置类型" min-width="80px"> | 
|---|
|  |  |  | <el-table-column prop="areaType" label="位置类型" min-width="70px"> | 
|---|
|  |  |  | <template v-slot="scope"> | 
|---|
|  |  |  | <span v-if="scope.row.areaType == 0">室内装修</span> | 
|---|
|  |  |  | <span v-if="scope.row.areaType == 1">公共区域</span> | 
|---|
|  |  |  | 
|---|
|  |  |  | }}</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="categoryName" label="物品类型" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="creatorName" label="上报人" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="categoryName" label="工单分类" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column label="来源" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span v-if="row.origin == 0">自建</span> | 
|---|
|  |  |  | <span v-if="row.origin == 1">问题转工单</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="creatorName" label="上报人" min-width="80px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="createDate" label="上报时间" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="dealUserName" label="处理人" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column label="处理结果" min-width="100px"> | 
|---|
|  |  |  | <el-table-column prop="dealUserName" label="处理人" min-width="80px"></el-table-column> | 
|---|
|  |  |  | <el-table-column label="工单状态" min-width="70px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span v-if="row.dealStatus == 0">待指派</span> | 
|---|
|  |  |  | <span v-if="row.dealStatus == 1">已指派</span> | 
|---|
|  |  |  | <span v-if="row.dealStatus == 2">已处理</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column v-if="containPermissions(['business:ywworkorder:update'])" label="操作" min-width="80" | 
|---|
|  |  |  | <el-table-column v-if="containPermissions(['business:ywworkorder:update'])" label="操作" width="80" | 
|---|
|  |  |  | fixed="right"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span @click="handleDetail(row)" class="primaryColor cu">查看详情</span> | 
|---|
|  |  |  | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'YwWorkorder', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | components: { TableLayout, Pagination,Detail, OperaYwWorkorderWindow }, | 
|---|
|  |  |  | components: { TableLayout, Pagination, Detail, OperaYwWorkorderWindow }, | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | showDetail: false, | 
|---|
|  |  |  | searchForm: { | 
|---|
|  |  |  | selDate: [], | 
|---|
|  |  |  | areaType: '', | 
|---|
|  |  |  | areaIds: '', | 
|---|
|  |  |  | projectId: '', | 
|---|
|  |  |  | buildingId: '', | 
|---|
|  |  |  | cateId: '', | 
|---|
|  |  |  | origin: '' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | projectList: [], | 
|---|
|  |  |  | buildList: [], | 
|---|
|  |  |  | 
|---|
|  |  |  | this.$refs.DetailRef.visible = true | 
|---|
|  |  |  | this.$refs.DetailRef.id = row.id | 
|---|
|  |  |  | this.$refs.DetailRef.getDetail() | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | initData() { | 
|---|
|  |  |  | 
|---|
|  |  |  | buildingId: '', | 
|---|
|  |  |  | cateId: '', | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.buildList = [] | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | changeSelDate(e) { | 
|---|