|  |  |  | 
|---|
|  |  |  | <div slot="search-form"> | 
|---|
|  |  |  | <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> | 
|---|
|  |  |  | <el-form-item label="风险类型" prop="typeIdPath"> | 
|---|
|  |  |  | <!--          <el-cascader  v-model="searchForm.categoryList" :options="categorys" @change="handleChangeCategory" :show-all-levels="false" | 
|---|
|  |  |  | clearable filterable :props="categoryprops"  > | 
|---|
|  |  |  | <template slot-scope="{ node, data }"> | 
|---|
|  |  |  | <span>{{ data.name }}</span> <!– 自定义显示内容 –> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-cascader>--> | 
|---|
|  |  |  | <treeselect | 
|---|
|  |  |  | style="width: 150px" | 
|---|
|  |  |  | v-model="searchForm.typeIdPath" | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="工单号" prop="code"> | 
|---|
|  |  |  | <el-input v-model="searchForm.code" clearable placeholder="请输入工单号" @keypress.enter.native="search"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="状态描述" prop="status"> | 
|---|
|  |  |  | <el-select v-model="searchForm.status" placeholder="请选择" clearable  @change="search" > | 
|---|
|  |  |  | <el-option label="待分配WTS" value="0"></el-option> | 
|---|
|  |  |  | <!-- | 
|---|
|  |  |  | <el-option label="待分配任务" value="1"></el-option> | 
|---|
|  |  |  | --> | 
|---|
|  |  |  | <el-option label="待工程师处理" value="2"></el-option> | 
|---|
|  |  |  | <el-option label="SHE关闭" value="3"></el-option> | 
|---|
|  |  |  | <el-option label="WTS关闭" value="4"></el-option> | 
|---|
|  |  |  | <el-option label="工程师关闭" value="5"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="提交时间" prop="queryStartTime"> | 
|---|
|  |  |  | <el-date-picker type="datetime" v-model="searchForm.queryStartTime" value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="请选择开始时间" @change="changeRadio" /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="queryEndTime"> | 
|---|
|  |  |  | <el-date-picker type="datetime" v-model="searchForm.queryEndTime" value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="请选择结束时间" @change="changeRadio" /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="radio"> | 
|---|
|  |  |  | <el-radio-group v-model="searchForm.radio" size="small" @input="changeRadio"> | 
|---|
|  |  |  | <el-radio-button label="0">当天</el-radio-button> | 
|---|
|  |  |  | <el-radio-button label="1">近7天</el-radio-button> | 
|---|
|  |  |  | <el-radio-button label="2">近30天</el-radio-button> | 
|---|
|  |  |  | </el-radio-group> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <section> | 
|---|
|  |  |  | <el-button type="primary" @click="search">搜索</el-button> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-table-column prop="typeName" label="风险类型" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="status" label="状态" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span :class="'statusInfo'+row.status" v-if="row.status ==0">待处理</span> | 
|---|
|  |  |  | <span :class="'statusInfo'+row.status" v-else-if="row.status ==3 ||row.status ==4||row.status ==5">已处理</span> | 
|---|
|  |  |  | <span :class="'statusInfo'+row.status" v-else>处理中</span> | 
|---|
|  |  |  | <span :class="'statusInfo'+row.status" v-if="row.status ==3 ||row.status ==4||row.status ==5">已处理</span> | 
|---|
|  |  |  | <span :class="'statusInfo'+row.status" v-else>未处理</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="statusInfo" label="状态描述" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span :class="'statusInfo'+row.status" >{{ row.statusName }}</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="submitDate" label="上报时间" min-width="150px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="happenTime" label="发现时间" min-width="150px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="locationName" label="发生地点" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="riskInfo" label="风险描述" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="memberName" label="上报人员" min-width="100px"> | 
|---|
|  |  |  | <el-table-column prop="locationName" label="发生地点" min-width="150px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="riskInfo" label="风险描述" min-width="250px" show-overflow-tooltip ></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="memberName" label="上报人员" min-width="150px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span v-if="row.memberPhone" >{{row.memberName}} - {{row.memberPhone }}</span> | 
|---|
|  |  |  | <span v-else >{{row.memberName}} </span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="companyName" label="所属部门" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="companyName" label="所属部门" min-width="150px"></el-table-column>this管他了 | 
|---|
|  |  |  | <el-table-column prop="createDate" label="创建时间" min-width="150px"></el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | v-if="containPermissions(['business:workorder:update', 'business:workorder:delete'])" | 
|---|
|  |  |  | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import OperaWorkorderDetailDbhWindow from '@/components/business/OperaWorkorderDetailDbhWindow' | 
|---|
|  |  |  | import { treeList } from '@/api/business/category' | 
|---|
|  |  |  | import { timeForMat } from '@/utils/util' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'Workorder', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | searchForm: { | 
|---|
|  |  |  | queryStartTime: null, | 
|---|
|  |  |  | queryEndTime: null, | 
|---|
|  |  |  | radio: null, | 
|---|
|  |  |  | type: '3', | 
|---|
|  |  |  | memberName: '', | 
|---|
|  |  |  | memberCompanyId: '', | 
|---|
|  |  |  | 
|---|
|  |  |  | typeId: null, | 
|---|
|  |  |  | typeIdPath: null, | 
|---|
|  |  |  | code: '', | 
|---|
|  |  |  | status: null, | 
|---|
|  |  |  | categoryList: [] | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | categoryprops: { | 
|---|
|  |  |  | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | changeRadio(e) { | 
|---|
|  |  |  | if (e === '0') { | 
|---|
|  |  |  | this.searchForm.queryStartTime = timeForMat(0)[0] | 
|---|
|  |  |  | this.searchForm.queryEndTime = timeForMat(0)[1] | 
|---|
|  |  |  | } else if (e === '1') { | 
|---|
|  |  |  | this.searchForm.queryStartTime = timeForMat(6)[0] | 
|---|
|  |  |  | this.searchForm.queryEndTime = timeForMat(6)[1] | 
|---|
|  |  |  | } else if (e === '2') { | 
|---|
|  |  |  | this.searchForm.queryStartTime = timeForMat(29)[0] | 
|---|
|  |  |  | this.searchForm.queryEndTime = timeForMat(29)[1] | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.searchForm.radio = '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.searchForm.queryStartTime && this.searchForm.endTime && new Date(this.searchForm.startTime).getTime() > new Date(this.searchForm.endTime).getTime()) { | 
|---|
|  |  |  | this.$message.error('开始时间不能大于结束时间') | 
|---|
|  |  |  | this.searchForm.queryStartTime = '' | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | normalizeOptions(node) { | 
|---|
|  |  |  | if (node.childList && !node.childList.length) { | 
|---|
|  |  |  | // 去掉children=[]的children属性 | 
|---|