Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | NProgress.configure({ showSpinner: false }) |
| | | |
| | | const whiteList = ['/login', '/register','/screen'] |
| | | const whiteList = ['/login', '/register'] |
| | | |
| | | router.beforeEach((to, from, next) => { |
| | | NProgress.start() |
| | |
| | | this.loginInfo = loginInfo.user |
| | | //如果返回为1正常跳转 |
| | | if (this.loginInfo.firstLogin == 1) { |
| | | this.$router.push({ path: "/" }).catch(() => { }); |
| | | return; |
| | | this.$router.push({ path: this.redirect || "/" }).catch(() => { }); |
| | | // this.$router.push({ path: "/" }).catch(() => { }); |
| | | // return; |
| | | this.$router.push({ path: this.redirect || "/screen" }).catch(() => { }); |
| | | } else { |
| | | localStorage.setItem('firstLogin', 0) |
| | | } |
| | |
| | | <div> |
| | | <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect" |
| | | style="margin-bottom: 10px"> |
| | | <el-menu-item index="1">省厅考核</el-menu-item> |
| | | <el-menu-item index="2">区域考核</el-menu-item> |
| | | <el-menu-item index="0">省厅考核</el-menu-item> |
| | | <el-menu-item index="1">区域考核</el-menu-item> |
| | | </el-menu> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | |
| | | <div style="text-align: right; margin-top: 10px"> |
| | | <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage4" |
| | | :page-sizes="[5, 10, 20]" :page-size="5" layout="total, sizes, prev, pager, next, jumper" :total="4"> |
| | | <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
| | | :current-page="queryParams.pageNum" :page-sizes="[10, 20, 50]" :page-size="queryParams.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" :total="tableData.length"> |
| | | </el-pagination> |
| | | </div> |
| | | |
| | |
| | | dicts: ['platform_examine_use', 'platform_examine_category'], |
| | | data() { |
| | | return { |
| | | activeIndex: '1', |
| | | activeIndex2: '2', |
| | | activeIndex: '0', |
| | | areaList: [], |
| | | date: '', |
| | | dateRange: '', |
| | | company: '', |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | deptId: null, |
| | | examinTag:0 |
| | | }, |
| | | dataList: [ |
| | | { |
| | | name: '全部', |
| | | complete: { |
| | | '4.5': 95.5, '4.6': 95.3, '4.7': 96.0, '4.8': 97.2, '4.9': 96.5, |
| | | '4.10': 95.5, '4.11': 95.3, '4.12': 96.0, '4.13': 97.2, '4.14': 96.5, |
| | | '4.15': 95.5, '4.16': 95.3, '4.17': 96.0, '4.18': 97.2, '4.19': 96.5, |
| | | '4.20': 95.5, '4.21': 95.3, '4.22': 96.0, '4.23': 97.2, '4.24': 96.5, |
| | | '4.25': 95.5, '4.26': 95.3, '4.27': 96.0, '4.28': 97.2, '4.29': 96.5 |
| | | }, |
| | | waiting: { |
| | | '4.5': 94.8, '4.6': 91.3, '4.7': 95.3, '4.8': 92.3, '4.9': 93.3, |
| | | '4.10': 94.8, '4.11': 91.3, '4.12': 95.3, '4.13': 92.3, '4.14': 93.3 |
| | | }, |
| | | pending: { |
| | | '4.5': 91.6, '4.6': 92.6, '4.7': 93.7, '4.8': 94.0, '4.9': 95.9 |
| | | , '4.10': 91.6, '4.11': 92.6, '4.12': 93.7, '4.13': 94.0, '4.14': 95.9 |
| | | } |
| | | } |
| | | ], |
| | | tableData: [], |
| | | loading: false, |
| | | searchForm: { |
| | | time: null, |
| | | } |
| | |
| | | const year = date.getFullYear(); |
| | | const month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1); |
| | | this.date = year + '-' + month; |
| | | console.log(this.date); |
| | | this.queryParams.date = this.date; |
| | | this.getList(this.$route.query.index); |
| | | this.areaSelect(); |
| | | }, |
| | | computed: { |
| | | ...mapState('dict', ['dict']) |
| | | |
| | | }, |
| | | methods: { |
| | | // 区域下拉数据 |
| | |
| | | }, |
| | | /** 导航切换 */ |
| | | handleSelect(key) { |
| | | this.activeIndex = key; // 更新当前激活的菜单项 |
| | | this.getList(); |
| | | this.activeIndex = key; |
| | | this.queryParams.examinTag = key; |
| | | this.getList(this.queryParams.deptId); |
| | | }, |
| | | /** 查询考核模板列表 */ |
| | | getList(deptId) { |
| | | this.loading = true; |
| | | lineChart.showLoading(); |
| | | listScore(this.queryParams).then(response => { |
| | | this.tableData = response.data[deptId]; |
| | | this.loading = false; |
| | | |
| | | this.initChart(response.data[deptId]); |
| | | }); |
| | | }, |
| | |
| | | ] |
| | | }; |
| | | lineChart.setOption(option, true); |
| | | lineChart.hideLoading(); |
| | | }, |
| | | |
| | | groupByData(data) { |
| | | if(!data) return []; |
| | | if (!data) return this.getAllDay().map((item) => [item, []]); |
| | | const tempGroup = {}; |
| | | data.forEach((item) => { |
| | | const { createTime } = item; |
| | | let { createTime } = item; |
| | | let tempTime = createTime.split('-'); |
| | | createTime = tempTime[1] + '-' + tempTime[2]; |
| | | if (!tempGroup[createTime]) { |
| | | tempGroup[createTime] = []; |
| | | } |
| | | tempGroup[createTime].push(item); |
| | | }) |
| | | const tempArray = Object.entries(tempGroup).sort(([keyA], [keyB]) => new Date([keyA]) - new Date([keyB])); |
| | | |
| | | return tempArray; |
| | | }, |
| | | filterData(data,tag) { |
| | | if(!data) return [0]; |
| | | const scoreList = data.map((item) => { |
| | | let temp = item[1].find((exam) => exam.examineCategory === tag); |
| | | if (temp) { |
| | | return temp.score; |
| | | } else { |
| | | return; |
| | | } |
| | | }); |
| | | console.log(scoreList); |
| | | return scoreList; |
| | | }, |
| | | |
| | | getAllDay() { |
| | | const currentDate = this.date.split('-'); |
| | | const currentYear = currentDate[0]; |
| | | const currentMonth = currentDate[1]; |
| | | const daysInMonth = new Date(currentYear, currentMonth, 0).getDate(); |
| | | const datesOfMonth = []; |
| | | for (var day = 1; day <= daysInMonth; day++) { |
| | | const formattedDate = currentMonth + '-' + (day.toString().padStart(2, '0')); |
| | | datesOfMonth.push(formattedDate); |
| | | } |
| | | return datesOfMonth; |
| | | }, |
| | | |
| | | // 监听变化 |
| | |
| | | |
| | | }, |
| | | mounted() { |
| | | this.acitveData = this.dataList[0]; |
| | | this.company = this.acitveData.name; |
| | | lineChart = echarts.init(this.$refs.chartContent); |
| | | this.initChart(); |
| | | this.getList(this.$route.query.index); |
| | | this.observe(); |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> |
| | | <el-form-item label="运维考核单位" prop="belongUnit"> |
| | | <el-select v-model="queryParams.unitId" @change="handleQuery" clearable placeholder="运维考核单位"> |
| | | <el-option |
| | | v-for="item in unitList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | <el-option v-for="item in unitList" :key="item.id" :label="item.value" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="审核时间"> |
| | | <el-date-picker |
| | | v-model="daterangeAuditingTime" |
| | | style="width: 240px" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | ></el-date-picker> |
| | | <el-date-picker v-model="daterangeAuditingTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="创建时间"> |
| | | <el-date-picker |
| | | v-model="daterangeCreateTime" |
| | | style="width: 240px" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="daterange" |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | ></el-date-picker> |
| | | <el-date-picker v-model="daterangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" |
| | | type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['platform:score:add']" |
| | | >新增</el-button> |
| | | <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" |
| | | v-hasPermi="['platform:score:add']">新增</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['platform:score:edit']" |
| | | >修改</el-button> |
| | | <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" |
| | | v-hasPermi="['platform:score:edit']">修改</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['platform:score:remove']" |
| | | >删除</el-button> |
| | | <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" |
| | | v-hasPermi="['platform:score:remove']">删除</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['platform:score:export']" |
| | | >导出</el-button> |
| | | <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" |
| | | v-hasPermi="['platform:score:export']">导出</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | |
| | | <el-table-column label="审核人" align="center" prop="auditingUser" /> |
| | | <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-s-check" |
| | | @click="handleAuditing(scope.row)" |
| | | v-hasPermi="['default:audit']" |
| | | v-if="scope.row.auditingStatus === '待审核'" |
| | | >审核</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:auditing:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | >删除</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-s-check" @click="handleAuditing(scope.row)" |
| | | v-hasPermi="['default:audit']" v-if="scope.row.auditingStatus === '待审核'">审核</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" |
| | | v-if="scope.row.auditingStatus === '待审核'" v-hasPermi="['system:auditing:edit']">修改</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" /> |
| | | |
| | | <!-- 审核 --> |
| | | <el-dialog title="运维考核审核" :visible.sync="auditingOpen" width="500px" append-to-body> |
| | |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-form-item label="运维考核单位" prop="unitId"> |
| | | <el-select v-model="form.unitId" placeholder="运维考核单位" @change="handleChangeUnit"> |
| | | <el-option |
| | | v-for="item in unitList" |
| | | :key="item.id" |
| | | :label="item.value" |
| | | :value="item.id"> |
| | | <el-option v-for="item in unitList" :key="item.id" :label="item.value" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <div class="row-left"> |
| | | <div class="block"> |
| | | <span class="demonstration"></span> |
| | | <el-cascader |
| | | ref="cascader" |
| | | v-model="form.ruleIdsArray" |
| | | :options="options" |
| | | @change="handleChange"> |
| | | <el-cascader ref="cascader" v-model="form.ruleIdsArray" :options="options" @change="handleChange"> |
| | | <template slot-scope="{ data }"> |
| | | <el-tooltip |
| | | class="item" |
| | | :disabled="data.label.length < 16 && !data.deductCategory" |
| | | effect="dark" |
| | | <el-tooltip class="item" :disabled="data.label.length < 16 && !data.deductCategory" effect="dark" |
| | | :content="data.label.length < 16 ? data.deductCategory ? data.deductCategory + ' ' + data.calcFraction + (data.calcUnit ? '/' + data.calcUnit : '') : '' : (data.deductCategory ? data.label + ' ' + data.deductCategory + ' ' + data.calcFraction + (data.calcUnit ? '/' + data.calcUnit : '') : data.label)" |
| | | placement="left" |
| | | > |
| | | placement="left"> |
| | | <span>{{ data.label }}</span> |
| | | </el-tooltip> |
| | | </template> |
| | |
| | | createTime: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | form: { |
| | | score: '', |
| | | temp: '' |
| | | }, |
| | | // 表单校验 |
| | | auditingRules: { |
| | | auditingStatus: [ |
| | |
| | | this.form.score = item.calcFraction; |
| | | } else { |
| | | this.needNum = true; |
| | | this.form.score = null; |
| | | this.form.score = ''; |
| | | } |
| | | if (this.form.num != null && this.needNum) { |
| | | this.handleChangeNum(); |
| | |
| | | this.form.score = Math.floor(Math.ceil(this.form.num / this.calcObj.calcUnit) * this.calcObj.calcFraction * 100) / 100; |
| | | } |
| | | }, |
| | | |
| | | handleChangeUnit(value) { |
| | | getRuleListByUnitId(value).then((res) => { |
| | | this.options = this.getTreeData(res.data); |
| | |
| | | auditingStatus: null, |
| | | remark: null, |
| | | auditingTime: null, |
| | | auditingUser: null |
| | | auditingUser: null, |
| | | score: '' |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | if (row.auditingStatus != '待审核') { |
| | | this.$message.warning("该记录已审核,不能修改"); |
| | | return; |
| | | } |
| | | getAuditing(id).then(response => { |
| | | this.form = response.data; |
| | | this.form = { ...response.data }; |
| | | this.open = true; |
| | | this.title = "修改运维考核积分"; |
| | | this.handleChangeUnit(this.form.unitId); |
| | |
| | | .margin-5 { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .row-warp { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .row { |
| | | display: flex; |
| | | flex-direction: row; |
| | |
| | | justify-content: center; |
| | | margin: 5px 0; |
| | | } |
| | | |
| | | .row-left { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-direction: row; |
| | | } |
| | | |
| | | .row-right { |
| | | flex: 1; |
| | | display: flex; |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row> |
| | | <el-col :span="8" v-for="item in workOrderList" :key="item" style="width: 390px;margin-left: 40px;margin-top:20px;"> |
| | | <el-card :body-style="{ padding: '0px' }"> |
| | | <el-row :gutter="20"> |
| | | <el-col :xl="6" :lg="8" :md="12" :sm="24" v-for="item in workOrderList" :key="item" style="margin-bottom: 20px;"> |
| | | <el-card :body-style="{ padding: '0px',display: 'flex' }"> |
| | | <el-image :preview-src-list="['https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357']" fit="cover" src="https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357" class="image"/> |
| | | <div style="padding-right: 10px;padding-top: 10px;float: right;"> |
| | | <div style="padding-right: 10px;padding-top: 10px;"> |
| | | <el-row> |
| | | <el-col :span="24" class="time">故障类型:<el-tag size="small" type="danger">市政施工</el-tag></el-col> |
| | | </el-row> |