|
@@ -0,0 +1,311 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <!-- 面包屑导航 -->
|
|
|
+ <el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
+ <el-breadcrumb-item>问题</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item>停机问题</el-breadcrumb-item>
|
|
|
+ </el-breadcrumb>
|
|
|
+ <!-- 搜索筛选 -->
|
|
|
+ <el-form ref="ruleForm"
|
|
|
+ :model="searchData"
|
|
|
+ style="margin-top: 20px;">
|
|
|
+ <el-row style="display: flex">
|
|
|
+ <el-form-item label="长期措施状态" label-width="100px" prop="areaId" style="margin-right:20px">
|
|
|
+ <el-select v-model="searchData.longSolutionStatus"
|
|
|
+ placeholder="请选择长期措施状态"
|
|
|
+ size="small"
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="(item,index) in shortSolutionStatusArr"
|
|
|
+ :label="item.name"
|
|
|
+ :key="index"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="短期措施状态" label-width="100px" prop="areaId" style="margin-right:20px">
|
|
|
+ <el-select v-model="searchData.shortSolutionStatus"
|
|
|
+ placeholder="请选择短期措施状态"
|
|
|
+ size="small"
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="(item,index) in shortSolutionStatusArr"
|
|
|
+ :label="item.name"
|
|
|
+ :key="index"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="负责部门" label-width="80px" prop="areaId" style="margin-right:20px">
|
|
|
+ <el-select v-model="searchData.departmentId"
|
|
|
+ placeholder="请选择部门"
|
|
|
+ size="small"
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="(item,index) in dept"
|
|
|
+ :label="item.name"
|
|
|
+ :key="index"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="margin-left:20px">
|
|
|
+ <el-button size="small" type="primary" @click="Export">批量导出</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="display: flex">
|
|
|
+ <el-form-item label="Rank" label-width="80px" prop="areaId" style="margin-right:20px">
|
|
|
+ <el-select v-model="searchData.rankId"
|
|
|
+ placeholder="请选择Rnak"
|
|
|
+ size="small"
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="(item,index) in RankArr"
|
|
|
+ :label="item.name"
|
|
|
+ :key="index"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="区域选择" label-width="80px" prop="areaId" style="margin-right:20px">
|
|
|
+ <el-select v-model="searchData.areaId"
|
|
|
+ placeholder="请选择区域"
|
|
|
+ size="small"
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="(item,index) in areas"
|
|
|
+ :label="item.name"
|
|
|
+ :key="index"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="lssue状态" label-width="80px" prop="areaId" style="margin-right:20px">
|
|
|
+ <el-select v-model="searchData.status"
|
|
|
+ placeholder="请选择lssue状态"
|
|
|
+ size="small"
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="(item,index) in statusArr"
|
|
|
+ :label="item.name"
|
|
|
+ :key="index"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="lssue号码" label-width="80px" prop="commitUsername">
|
|
|
+ <el-input size="small" v-model="searchData.id"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item style="margin-left:20px">
|
|
|
+ <el-button size="small" type="primary" @click="search">检索</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <!--列表-->
|
|
|
+ <el-table :data="questionData"
|
|
|
+ highlight-current-row
|
|
|
+ :header-cell-style="{'background-color':'#FAFAFA','color':'#000'}"
|
|
|
+ border>
|
|
|
+ <el-table-column prop="id" label="序号" min-width="20" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="statusValue" label="状态" min-width="60" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="detail" label="描述" min-width="40" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="departmentName" label="负责部门" min-width="30" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createdUsername" label="短期措施" min-width="30" align="center">
|
|
|
+ <template slot-scope="scope" style="display: flex" >
|
|
|
+ <el-button v-if="scope.row.shortSolutionStatus=='已完成'" size="small" class="typeC3" >已完成</el-button>
|
|
|
+ <el-button v-if="scope.row.shortSolutionStatus=='待完成'" size="small" class="typeC2" >待完成</el-button>
|
|
|
+ <el-button v-if="scope.row.shortSolutionStatus=='等待指派'" size="small" class="typeC0" >等待指派</el-button>
|
|
|
+ <el-button v-if="scope.row.shortSolutionStatus=='处理中'" size="small" class="typeC1" >处理中</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createdUsername" label="长期措施" min-width="30" align="center">
|
|
|
+ <template slot-scope="scope" style="display: flex">
|
|
|
+ <el-button v-if="scope.row.longSolutionStatus=='已完成'" size="small" class="typeC3" >已完成</el-button>
|
|
|
+ <el-button v-if="scope.row.longSolutionStatus=='待完成'" size="small" class="typeC2" >待完成</el-button>
|
|
|
+ <el-button v-if="scope.row.longSolutionStatus=='等待指派'" size="small" class="typeC0" >等待指派</el-button>
|
|
|
+ <el-button v-if="scope.row.longSolutionStatus=='处理中'" size="small" class="typeC1" >处理中</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="startTime" label="发生时间" min-width="30" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="操作" min-width="50">
|
|
|
+ <template slot-scope="scope" style="display: flex">
|
|
|
+ <el-button type="text" size="small" @click="delquestion(scope)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- 分页组件 -->
|
|
|
+ <template v-if="questionData.length">
|
|
|
+ <Pagination :childMsg="pageInfo"
|
|
|
+ style="display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ margin-top: 20px;"
|
|
|
+ @currentChange="get_page">
|
|
|
+ </Pagination>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import Pagination from '@/components/Pagination'
|
|
|
+ import { selectStopPage,stopExport,removeIssue,getDeptCode,Rank } from '@/api/question'
|
|
|
+ import { getArea } from '@/api/common'
|
|
|
+ // 一页数据量
|
|
|
+ const pageSize = 8
|
|
|
+ export default {
|
|
|
+ name: "question",
|
|
|
+ components: {
|
|
|
+ Pagination
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ checkBoxData: [],
|
|
|
+ "areas": [],
|
|
|
+ "dept":[],
|
|
|
+ "RankArr":[],
|
|
|
+ searchareaId:'',
|
|
|
+ // 搜索数据
|
|
|
+ searchData: {
|
|
|
+ "longSolutionStatus":"",
|
|
|
+ "shortSolutionStatus":"",
|
|
|
+ "departmentId":"",
|
|
|
+ "areaId": "",
|
|
|
+ "rankId":"",
|
|
|
+ "status":"",
|
|
|
+ "id":"",
|
|
|
+ "page": 1,
|
|
|
+ "size": pageSize
|
|
|
+ },
|
|
|
+ // 类型
|
|
|
+ types: [
|
|
|
+ {'status':'0' , 'value': '计划停机'},
|
|
|
+ {'status':'1' , 'value': '调试'},
|
|
|
+ {'status':'2' , 'value': '生产'},
|
|
|
+ {'status':'3' , 'value': '休息'}
|
|
|
+ ],
|
|
|
+ // 类型
|
|
|
+ chanpinFlag: [
|
|
|
+ {'status':0 , 'value': '是'},
|
|
|
+ {'status':1 , 'value': '否'}
|
|
|
+ ],
|
|
|
+ // 类型
|
|
|
+ statusArr: [
|
|
|
+ {'id':'0' , 'name': '打开'},
|
|
|
+ {'id':'1' , 'name': '关闭'}
|
|
|
+ ],
|
|
|
+ // 部门状态
|
|
|
+ shortSolutionStatusArr: [
|
|
|
+ {'id':'0' , 'name': '等待指派'},
|
|
|
+ {'id':'1' , 'name': '待完成'},
|
|
|
+ {'id':'2' , 'name': '处理中'},
|
|
|
+ {'id':'3' , 'name': '已完成'}
|
|
|
+ ],
|
|
|
+ // 计划数据
|
|
|
+ questionData: [],
|
|
|
+ // 分页参数
|
|
|
+ pageInfo: {
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: pageSize,
|
|
|
+ total: 5
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.get_question_list()
|
|
|
+ this.get_area()
|
|
|
+ this.getDept()
|
|
|
+ this.getRank()
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ // 获取所有区域
|
|
|
+ get_area() {
|
|
|
+ getArea().then(res => {
|
|
|
+ this.areas = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取所有部门
|
|
|
+ getDept() {
|
|
|
+ getDeptCode().then(res => {
|
|
|
+ this.dept = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取所有Rank
|
|
|
+ getRank() {
|
|
|
+ Rank().then(res => {
|
|
|
+ this.RankArr = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 问题列表
|
|
|
+ get_question_list() {
|
|
|
+ selectStopPage(this.searchData).then(res=> {
|
|
|
+ this.questionData = res.data.row
|
|
|
+ this.pageInfo.total = parseInt(res.data.total)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 搜索
|
|
|
+ search() {
|
|
|
+ this.get_question_list()
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ delquestion(index) {
|
|
|
+ var that=this
|
|
|
+ var delData={
|
|
|
+ issueType:0,
|
|
|
+ id:index.row.id
|
|
|
+ }
|
|
|
+ this.$confirm('确定设置当前产品', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ removeIssue(delData).then(res=> {
|
|
|
+ if(res.status === '20000'){
|
|
|
+ that.$message.success('删除成功')
|
|
|
+ that.get_question_list()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ that.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //导出
|
|
|
+ Export(){
|
|
|
+ let data = this.searchData
|
|
|
+ stopExport(data)
|
|
|
+ },
|
|
|
+ // 获取点击页数
|
|
|
+ get_page(val) {
|
|
|
+ this.searchData.page = val
|
|
|
+ this.get_question_list()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+ .typeC0{
|
|
|
+ background: #f8ac5a;
|
|
|
+ color: #fff;
|
|
|
+ padding: 4px 15px;
|
|
|
+ cursor: inherit;
|
|
|
+ }
|
|
|
+ .typeC1{
|
|
|
+ background: #1d84c6;
|
|
|
+ color: #fff;
|
|
|
+ padding: 4px 15px;
|
|
|
+ cursor: inherit;
|
|
|
+ }
|
|
|
+ .typeC2{
|
|
|
+ background: #52d4b0;
|
|
|
+ color: #fff;
|
|
|
+ padding: 4px 15px;
|
|
|
+ cursor: inherit;
|
|
|
+ }
|
|
|
+ .typeC3{
|
|
|
+ background: #d1dade;
|
|
|
+ color: #000;
|
|
|
+ padding: 4px 15px;
|
|
|
+ cursor: inherit;
|
|
|
+ }
|
|
|
+</style>
|