| | |
| | | <!-- 搜索表单 --> |
| | | <div slot="search-form"> |
| | | <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="风险类型" prop="typeId"> |
| | | <el-select v-model="searchForm.typeId" @change="search"> |
| | | <el-form-item label="观察主题" prop="typeId"> |
| | | <el-select v-model="searchForm.typeId" @change="search" style="width: 120px"> |
| | | <el-option clearable filterable |
| | | v-for="item in categorys" |
| | | :key="item.id" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="上报人员" prop="memberName"> |
| | | <el-input v-model="searchForm.memberName" clearable placeholder="人员姓名或手机号" @keypress.enter.native="search"></el-input> |
| | | |
| | | |
| | | <el-input v-model="searchForm.memberName" style="width: 120px" clearable placeholder="人员姓名或手机号" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="工单号" prop="code"> |
| | | <el-input v-model="searchForm.code" clearable placeholder="请输入工单号" @keypress.enter.native="search"></el-input> |
| | | <el-input v-model="searchForm.code" clearable style="width: 150px" placeholder="工单号" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="提交时间" prop="queryStartTime"> |
| | | <el-date-picker style="width: 185px" 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 style="width: 185px" 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="code" label="工单号" min-width="150px" fixed> |
| | | <template slot-scope="{row}"> |
| | | <span style="color: #2E68EC;cursor: pointer" @click="$refs.operaWorkorderWindow.open('SHE事件工单详情', row)" >{{ row.code || '-'}}</span> |
| | | <span style="color: #2E68EC;cursor: pointer" @click="$refs.operaWorkorderWindow.open('DCA事件工单记录详情', row)" >{{ row.code || '-'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="memberName" label="上报人员" min-width="100px"> |
| | | <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="typeName" label="观察主题" min-width="150px"></el-table-column> |
| | | <el-table-column prop="dcaYesNum" label="观察项统计" min-width="150px"> |
| | | <template slot-scope="{row}"> |
| | | <span style="color: #1562e2" >符合:{{row.dcaYesNum}} ,不符合:<span style="color:red;">{{row.dcaNoNum}}</span> </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="locationName" label="位置" min-width="150px"></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-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="submitDate" label="上报时间" min-width="150px"></el-table-column> |
| | | <el-table-column prop="happenTime" label="发现时间" min-width="150px"></el-table-column> |
| | | <el-table-column prop="memberNames" label="通知人" min-width="150px"></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="150px"></el-table-column> |
| | | <el-table-column prop="createDate" label="创建时间" min-width="150px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:workorder:update', 'business:workorder:delete'])" |
| | |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaWorkorderWindow.open('DCA事件工单详情', row)" icon="el-icon-zoom-out" >查看详情</el-button> |
| | | <el-button type="text" @click="$refs.operaWorkorderWindow.open('DCA事件工单记录详情', row)" icon="el-icon-zoom-out" >查看详情</el-button> |
| | | <!--<el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:workorder:delete']">删除</el-button>--> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaWorkorderDetailDcaWindow from '@/components/business/OperaWorkorderDetailDcaWindow' |
| | | import { allList } from '@/api/business/category' |
| | | import { timeForMat } from '@/utils/util' |
| | | export default { |
| | | name: 'Workorder', |
| | | extends: BaseTable, |
| | |
| | | return { |
| | | // 搜索 |
| | | searchForm: { |
| | | queryStartTime: null, |
| | | queryEndTime: null, |
| | | radio: null, |
| | | type: '1', |
| | | memberName: '', |
| | | memberCompanyId: '', |
| | | localtionId: '', |
| | | typeId: '', |
| | | typeId: null, |
| | | code: '', |
| | | categoryList: [] |
| | | }, |
| | |
| | | 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() |
| | | }, |
| | | handleChangeCategory (value) { |
| | | if (this.searchForm.categoryList && this.searchForm.categoryList.length >= 1) { |
| | | this.searchForm.typeId = this.searchForm.categoryList[this.searchForm.categoryList.length - 1] |