From c46e3ad03a8c5fb27b0361d219babca0e537ad77 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 30 四月 2024 13:44:39 +0800
Subject: [PATCH] 考核结果三级页面
---
/dev/null | 286 --------------------------
src/views/system/result/index.vue | 35 +-
src/api/platform/check-score.js | 7
src/views/system/result/detail/detail.vue | 209 ++++++------------
src/views/system/result/detail/index1.vue | 83 ++++++-
src/api/platform/check-template.js | 9
src/views/system/template/index.vue | 6
7 files changed, 172 insertions(+), 463 deletions(-)
diff --git a/src/api/platform/check-score.js b/src/api/platform/check-score.js
index e368106..98d0929 100644
--- a/src/api/platform/check-score.js
+++ b/src/api/platform/check-score.js
@@ -18,10 +18,11 @@
}
// 鏌ヨ鑰冩牳绉垎鏄庣粏璇︾粏
-export function getScoreIndex(id) {
+export function getScoreIndex(query) {
return request({
- url: '/check/score/detail/' + id,
- method: 'get'
+ url: '/check/score/detail/index',
+ method: 'get',
+ params: query
})
}
diff --git a/src/api/platform/check-template.js b/src/api/platform/check-template.js
index 95daedf..e8f4fdb 100644
--- a/src/api/platform/check-template.js
+++ b/src/api/platform/check-template.js
@@ -42,7 +42,14 @@
data: data
})
}
-
+// 淇敼鑰冩牳妯℃澘鏉冮噸
+export function updateWeight(data) {
+ return request({
+ url: '/check/template/weight',
+ method: 'put',
+ data: data
+ })
+}
// 鍒犻櫎鑰冩牳妯℃澘
export function delCheckTemplate(id) {
return request({
diff --git a/src/views/system/result/detail/detail.vue b/src/views/system/result/detail/detail.vue
index a6ff943..05adf88 100644
--- a/src/views/system/result/detail/detail.vue
+++ b/src/views/system/result/detail/detail.vue
@@ -1,15 +1,15 @@
<template>
<div class="app-container">
- <el-page-header @back="goBack" content="璇︽儏椤甸潰">
+ <el-page-header @back="goBack()" content="璇︽儏椤甸潰">
</el-page-header>
<el-container>
<el-main>
<h2>鑰冩牳瑙勫垯</h2>
<el-table v-loading="loading" :data="checkRuleList" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="checkRuleName" />
- <el-table-column label="瑙勫垯鏉冮噸" align="center" prop="weight" />
+ <el-table-column type="selection" width="55" align="center"/>
+ <el-table-column label="瑙勫垯鍚嶇О" align="center" prop="checkRuleName"/>
+ <el-table-column label="瑙勫垯鏉冮噸" align="center" prop="weight"/>
<el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@@ -17,38 +17,43 @@
type="text"
icon="el-icon-edit"
@click="handleRuleUpdate(scope.row)"
- >淇敼</el-button>
+ >淇敼
+ </el-button>
</template>
</el-table-column>
</el-table>
- <pagination
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getRuleList"
- />
</el-main>
</el-container>
<el-container>
<el-main>
<h2>鑰冩牳鎴愮哗</h2>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
+ <el-row :gutter="10" class="mb5">
+ <el-col :span="1.5" style="margin-right: 20px">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
- >瀵煎嚭</el-button>
+ >瀵煎嚭
+ </el-button>
</el-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getRuleList"></right-toolbar>
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
+ <el-form-item label="鑰冩牳鏃ユ湡" prop="name">
+ <el-date-picker v-model="date" format="yyyy-MM" value-format="yyyy-MM" type="month" placeholder="閫夋嫨鏃ユ湡"
+ @change="dateChange">
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+ </el-form-item>
+ </el-form>
+
</el-row>
- <el-table v-loading="loading" :data="dataMap" @selection-change="handleSelectionChange">
+ <el-table v-loading="loading" :data="dataMap" @selection-change="handleSelectionChange">
<el-table-column label="鑰冩牳鏃ユ湡" align="center" prop="create_time" width="120px" fixed>
<template slot-scope="scope">
<span>{{ scope.row.create_time.split('T')[0] }}</span>
@@ -64,23 +69,23 @@
:key="item.ruleName"
:label="item.ruleName"
align="center"
- width = "120px"
+ width="180px"
>
<template slot-scope="scope">
<span>{{ scope.row[item.ruleIndex] }}</span>
</template>
</el-table-column>
</template>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleIndexUpdate(scope.row,scope.index)"
- >淇敼</el-button>
- </template>
- </el-table-column>
+ <!-- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" fixed="right">-->
+ <!-- <template slot-scope="scope">-->
+ <!-- <el-button-->
+ <!-- size="mini"-->
+ <!-- type="text"-->
+ <!-- icon="el-icon-edit"-->
+ <!-- @click="handleIndexUpdate(scope.row,scope.index)"-->
+ <!-- >淇敼</el-button>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
</el-table>
</el-main>
</el-container>
@@ -92,7 +97,7 @@
<el-input v-model="ruleForm.checkRuleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled/>
</el-form-item>
<el-form-item label="瑙勫垯鏉冮噸" prop="weight">
- <el-input-number v-model="ruleForm.weight" :precision="1" placeholder="璇疯緭鍏ヨ鍒欐潈閲�" />
+ <el-input-number v-model="ruleForm.weight" :precision="1" :step="0.1" placeholder="璇疯緭鍏ヨ鍒欐潈閲�"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -105,16 +110,12 @@
<el-dialog :title="title" :visible.sync="indexOpen" width="600px" append-to-body>
<el-form ref="form" :model="indexForm" :rules="rules" label-width="150px">
<el-form-item label="鑰冩牳鏃ユ湡" prop="create_time">
- <el-input v-model="ruleForm.create_time" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled>
-
+ <el-input v-model="formattedCreateTime" placeholder="" disabled>
</el-input>
</el-form-item>
-<!-- <el-form-item label="鑰冩牳瀵硅薄" prop="checkRuleName">-->
-<!-- <el-input v-model="ruleForm.checkRuleName" placeholder="璇疯緭鍏ヨ鍒欏悕绉�" disabled/>-->
-<!-- </el-form-item>-->
<div v-for="item in tableData" :key="item.ruleIndex">
<el-form-item :label="item.ruleName" :prop="item.ruleIndex">
- <el-input-number v-model="indexForm[item.ruleIndex]" :precision="4" placeholder="璇疯緭鍏ユ寚鏍�"></el-input-number>
+ <el-input-number v-model="indexForm[item.ruleIndex]" :precision="4" :step="0.1" placeholder="璇疯緭鍏ユ寚鏍�"></el-input-number>
</el-form-item>
</div>
</el-form>
@@ -127,9 +128,10 @@
</template>
<script>
-import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result";
-import { listScore, getScoreIndex, delScore, addScore, updateScore } from "@/api/platform/check-score";
-import { areaSelect } from '@/api/system/dept'
+
+import {listScore, getScoreIndex, delScore, addScore, updateScore} from "@/api/platform/check-score";
+import {updateWeight} from "@/api/platform/check-template";
+import {areaSelect} from '@/api/system/dept'
export default {
name: "CheckResult",
@@ -137,9 +139,11 @@
data() {
return {
id: null,
+ examineCategory: null,
+ date: '',
examineTag: null,
deptId: null,
- areaList:[],
+ areaList: [],
tableData: [],
dataMap: [],
manualScoreOpen: false,
@@ -173,15 +177,22 @@
//璇锋眰鍙傛暟
queryParams: {
id: null,
+ date: null,
},
// 琛ㄥ崟鏍¢獙
rules: {}
};
},
+ computed: {
+ formattedCreateTime() {
+ // 濡傛灉 create_time 瀛樺湪锛屽垯杩斿洖鏃ユ湡閮ㄥ垎锛屽惁鍒欒繑鍥炵┖瀛楃涓�
+ return this.indexForm.create_time ? this.indexForm.create_time.split('T')[0] : '';
+ },
+ },
created() {
//鑰冩牳鎴愮哗璇︽儏璺宠浆鍙傛暟鎺ユ敹
- if(this.$route.query.id){
- this.id = this.$route.query.id
+ if (this.$route.query.id) {
+ this.queryParams.id = this.$route.query.id
}
// 鑰冩牳绉垎鍒楄〃
this.getList();
@@ -191,7 +202,7 @@
/** 鏌ヨ鑰冩牳璁″垎鍒楄〃 */
getList() {
this.loading = true;
- getScoreIndex(this.id).then(response => {
+ getScoreIndex(this.queryParams).then(response => {
this.checkRuleList = response.data.checkRuleList;
this.dataMap = response.data.scoreMap.dataMap;
this.tableData = response.data.scoreMap.tableData
@@ -211,8 +222,7 @@
checkRuleName: null,
weight: null,
};
- this.indexForm = {
- };
+ this.indexForm = {};
this.resetForm(formName);
},
translateDeptId(deptId) {
@@ -225,29 +235,23 @@
this.areaList = res.data;
})
},
- cancelManualScore() {
- this.manualScoreForm = {};
- this.manualScoreTitle = "";
- this.manualScoreOpen = false;
+ /** 杩斿洖鎸夐挳 */
+ goBack() {
+ const obj = { path: "/examine/detail", query: { index: this.$route.query.deptId, examineTag: this.$route.query.examineTag, pageNum: this.$route.query.pageNum } };
+ this.$tab.closeOpenPage(obj);
},
- submitManualScore() {
- if (! this.manualScoreForm.manualScore) {
- this.$modal.msgWarning("璇峰~鍐欏垎鏁�");
- return
+ // 鍏抽棴褰撳墠tab椤电锛屾墦寮�鏂伴〉绛�
+ closeOpenPage(obj) {
+ store.dispatch("tagsView/delView", router.currentRoute);
+ if (obj !== undefined) {
+ return router.push(obj);
}
- manualScore(this.manualScoreForm).then(res => {
- this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
- this.cancelManualScore();
- this.getList();
- })
},
- handleSetManualScore(row) {
- this.manualScoreForm.id = row.id;
- this.manualScoreForm.manualScore = parseInt(row.manualScore);
- this.manualScoreTitle = row.checkUnitName + '浜哄伐鎵撳垎'
- this.manualScoreOpen = true;
+ dateChange() {
+ this.queryParams.date = this.date;
+ console.log(this.queryParams);
+ this.getList();
},
-
/** 鎼滅储鎸夐挳鎿嶄綔 */
handleQuery() {
this.getList();
@@ -261,7 +265,7 @@
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
- this.single = selection.length!==1
+ this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 鏂板鎸夐挳鎿嶄綔 */
@@ -288,37 +292,21 @@
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
- if (this.form.id != null) {
- updateCheckResult(this.form).then(response => {
+ if (this.ruleForm.id != null) {
+ updateWeight(this.ruleForm).then(response => {
this.$modal.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- });
- } else {
- addCheckResult(this.form).then(response => {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- this.open = false;
+ this.ruleOpen = false;
this.getList();
});
}
}
});
},
- /** 鍒犻櫎鎸夐挳鎿嶄綔 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal.confirm('鏄惁纭鍒犻櫎鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() {
- return delCheckResult(ids);
- }).then(() => {
- this.getList();
- this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
- },
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
- this.download('system/checkResult/export', {
+ this.download('/check/score/export', {
...this.queryParams
- }, `checkResult_${new Date().getTime()}.xlsx`)
+ }, `鑰冩牳鎸囨爣_${new Date().getTime()}.xlsx`)
},
handleSelect(key, keyPath) {
console.log(key, keyPath);
@@ -328,57 +316,6 @@
</script>
<style scoped>
-.line {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
-}
-
-.line-right {
- width: 50px;
-}
-.input{
- width: 200px;
-}
-
-.input-w {
- margin-left: 5px;
- width: 70px;
-}
-.row-warp {
- display: flex;
- flex-direction: column;
- justify-content: center;
- text-align: center;
- border: solid 1px gray;
- /*padding: 3px;*/
-}
-.row {
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- border-bottom: solid 1px gray;
- padding: 3px;
-}
-.row:last-of-type {
- border-bottom: none;
-}
-.row-left {
- flex: 2;
- border-right: solid 1px gray;
-}
-.row-right {
- flex: 4;
- display: flex;
- flex-direction: row;
- justify-content: center;
-}
-.header-container {
- display: flex;
- align-items: center; /* 鍨傜洿灞呬腑 */
-}
.header-container h2 {
margin-right: 10px; /* 鏍规嵁闇�瑕佽皟鏁存爣棰樺拰鑿滃崟涔嬮棿鐨勯棿璺� */
diff --git a/src/views/system/result/detail/index.vue b/src/views/system/result/detail/index.vue
deleted file mode 100644
index 54eeb5a..0000000
--- a/src/views/system/result/detail/index.vue
+++ /dev/null
@@ -1,286 +0,0 @@
-<template>
- <div style="display: flex;flex-direction: row; padding: 15px">
- <div id="left">
- <div>
- <div>
- <div style="display: flex;flex-direction: row;">
- <div class="now-item">
- <div class="box now">
- <div class="title">
- 瑙嗛
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div class="now-item">
- <div class="box now">
- <div class="title">
- 浜鸿劯
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div class="now-item">
- <div class="box now">
- <div class="title">
- 鐩戞帶
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div style="justify-content: center;align-items: center;display: flex;width: 80px">
- <i class="el-icon-caret-left">鏈湀</i>
- </div>
-
- </div>
- </div>
- </div>
-
- <div style="margin-top: 20px">
- <div style="display: flex;flex-direction: row;">
- <div class="now-item">
- <div class="box">
- <div class="title">
- 瑙嗛
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div class="now-item">
- <div class="box">
- <div class="title">
- 浜鸿劯
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div class="now-item">
- <div class="box">
- <div class="title">
- 鐩戞帶
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div style="justify-content: center;align-items: center;display: flex;width: 80px">
- <i class="el-icon-caret-left">24.<span style="font-size: large">3</span></i>
- </div>
- </div>
- </div>
- <div style="margin-top: 20px">
- <div style="display: flex;flex-direction: row;">
- <div class="now-item">
- <div class="box">
- <div class="title">
- 瑙嗛
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div class="now-item">
- <div class="box">
- <div class="title">
- 浜鸿劯
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div class="now-item">
- <div class="box">
- <div class="title">
- 鐩戞帶
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div style="justify-content: center;align-items: center;display: flex;width: 80px">
- <i class="el-icon-caret-left">24.<span style="font-size: large">2</span></i>
- </div>
- </div>
- </div>
- <div style="margin-top: 20px">
- <div style="display: flex;flex-direction: row;">
- <div class="now-item">
- <div class="box">
- <div class="title">
- 瑙嗛
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div class="now-item">
- <div class="box">
- <div class="title">
- 浜鸿劯
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div class="now-item">
- <div class="box">
- <div class="title">
- 鐩戞帶
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div style="justify-content: center;align-items: center;display: flex;width: 80px">
- <i class="el-icon-caret-left">24.<span style="font-size: large">1</span></i>
- </div>
- </div>
- </div>
- <div style="margin-top: 20px">
- <div style="display: flex;flex-direction: row;">
- <div class="now-item">
- <div class="box">
- <div class="title">
- 瑙嗛
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div class="now-item">
- <div class="box">
- <div class="title">
- 浜鸿劯
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div class="now-item">
- <div class="box">
- <div class="title">
- 鐩戞帶
- </div>
- <div>
- 98
- </div>
- </div>
- </div>
- <div style="justify-content: center;align-items: center;display: flex;width: 80px">
- <i class="el-icon-caret-left">23.<span style="font-size: large">12</span></i>
- </div>
- </div>
- </div>
- </div>
- <div id="right">
- <div style="margin-top: 120px; display: flex;flex-direction: column; justify-content: center; align-items: center">
- <div style="width: 210px; margin-bottom: 15px">
- <el-switch
- v-model="searchForm.type"
- active-text="甯傚眬"
- inactive-text="鐪佸巺">
- </el-switch>
- </div>
- <div style="width: 210px; margin-bottom: 15px">
- <el-date-picker
- clearable
- v-model="searchForm.startTime"
- type="month"
- placeholder="寮�濮嬫椂闂�">
- </el-date-picker>
- </div>
- <div style="width: 210px; margin-bottom: 15px">
- <el-date-picker
- clearable
- v-model="searchForm.endTime"
- type="month"
- placeholder="缁撴潫鏃堕棿">
- </el-date-picker>
- </div>
-
- </div>
- </div>
- </div>
-</template>
-
-<script>
-export default {
- name: 'index',
- data() {
- return {
- searchForm: {
-
- }
- }
- }
-}
-</script>
-
-<style scoped>
-.now-item {
- flex: 1;
- display: flex;
- justify-content: center;
- align-items: center;
-}
-.now {
- background-color: #42b983;
- height: 80px !important;
-}
-.box {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- box-shadow: 0 2px 6px hsla(0, 0%, 7%, .1);
- border-radius: 10px;
- width: 240px;
- height: 50px;
-}
-.box:hover{
- cursor: pointer;
-}
-.month {
- margin-top: 20px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
-}
-.title {
- font-size: larger;
-}
-.item {
- flex: 1;
-}
-#left {
- flex: 5;
-}
-#right {
- flex: 1.5;
- height: 100%;
- overflow: hidden;
- display: flex;
- justify-content: center;
- align-items: center;
-}
-</style>
diff --git a/src/views/system/result/detail/index1.vue b/src/views/system/result/detail/index1.vue
index f85981a..f8e4941 100644
--- a/src/views/system/result/detail/index1.vue
+++ b/src/views/system/result/detail/index1.vue
@@ -50,17 +50,22 @@
<el-table-column label="鍒嗘暟" prop="score" align="center">
</el-table-column>
<el-table-column label="鐘舵��" prop="publish" align="center">
- </el-table-column>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
- <el-button size="small" type="text" v-show="scope.row.publish != 1">纭鍙戝竷</el-button>
- <el-button size="small" type="text" v-show="scope.row.publish == 1">鍙栨秷鍙戝竷</el-button>
+ <dict-tag :options="dict.type.platform_is_publish" :value="scope.row.publish" />
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" align="center">
+ <template slot-scope="scope">
+ <div style="display: flex;justify-content: center;">
+ <el-button size="small" type="text" @click="handlePublish(scope.row)" v-if="scope.row.publish === 'UNPUBLISHED'" >纭鍙戝竷</el-button>
+ <el-button size="small" type="text" @click="handlePublish(scope.row)" v-if="scope.row.publish === 'PUBLISHED'">鍙栨秷鍙戝竷</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleDetail(scope.row.id)"
>璇︾粏</el-button>
+ </div>
</template>
</el-table-column>
</el-table>
@@ -68,8 +73,8 @@
<pagination
v-show="total>0"
:total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
+ :page.sync="queryParamsList.pageNum"
+ :limit.sync="queryParamsList.pageSize"
@pagination="getList"
/>
@@ -86,11 +91,15 @@
let observer = null;
export default {
name: 'index',
- dicts: ['platform_examine_use', 'platform_examine_category'],
+ dicts: ['platform_examine_category','platform_is_publish'],
data() {
return {
activeIndex: '0',
areaList: [],
+ province: {
+ id: [],
+ publish: null,
+ },
date: '',
dateRange: '',
// 鎬绘潯鏁�
@@ -101,7 +110,14 @@
deptId: null,
examineTag:0
},
+ queryParamsList: {
+ pageNum: 1,
+ pageSize: 10,
+ deptId: null,
+ examineTag:0
+ },
tableData: [],
+ tableLoading: false,
loading: false,
searchForm: {
time: null,
@@ -113,20 +129,54 @@
console.log(this.$route.query.index)
if (this.$route.query.index) {
this.queryParams.deptId = this.$route.query.index
+ this.queryParamsList.deptId = this.$route.query.index
}
const date = new Date();
const year = date.getFullYear();
const month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1);
this.date = year + '-' + month;
this.queryParams.date = this.date;
+ this.queryParams.examineTag =this.$route.query.examineTag;
+ this.queryParamsList.examineTag =this.$route.query.examineTag;
+ this.activeIndex = this.$route.query.examineTag;
this.areaSelect();
- this.getChart(this.$route.query.index)
this.getList(this.$route.query.index);
},
computed: {
},
methods: {
+ //鍙戝竷
+ handlePublish(row) {
+ const getExamineCategoryText = category => {
+ switch (category) {
+ case 1: return '瑙嗛鑰冩牳';
+ case 2: return '杞﹁締鑰冩牳';
+ case 3: return '浜鸿劯鑰冩牳';
+ default: return '鏈煡';
+ }
+ };
+
+ const year = row.createTime.substr(0, 4);
+ const month = (parseInt(row.createTime.substr(5, 2), 10)).toString();
+ const day = (parseInt(row.createTime.substr(8, 2), 10)).toString();
+ const formattedCreateTime = year + '骞�' + month + '鏈�' + day + '鏃�';
+
+ let text = row.publish === 'UNPUBLISHED' ? '鍙戝竷' : '鍙栨秷鍙戝竷';
+ this.province.id = [row.id]
+ this.province.publish = text === "鍙戝竷" ? "PUBLISHED" : "UNPUBLISHED";
+ this.$modal.confirm('纭瑕�' + text + "" + getExamineCategoryText(row.examineCategory) + "" + formattedCreateTime + '鐨勮�冩牳鎴愮哗鍚楋紵')
+ .then(() => {
+ return publishScore(this.province);
+ })
+ .then(() => {
+ this.getList();
+ this.$modal.msgSuccess(text + "鎴愬姛");
+ })
+ .catch(() => {
+ // 閿欒澶勭悊閫昏緫
+ });
+ },
// 鍖哄煙涓嬫媺鏁版嵁
areaSelect() {
areaSelect().then(res => {
@@ -141,8 +191,9 @@
handleSelect(key) {
this.activeIndex = key;
this.queryParams.examineTag = key;
+ this.queryParamsList.examineTag = key;
this.getChart(this.queryParams.deptId);
- this.getList(this.queryParams.deptId);
+ this.getList(this.queryParamsList.deptId);
},
/** 鏌ヨ鑰冩牳妯℃澘鍒楄〃 */
getChart(deptId) {
@@ -156,7 +207,7 @@
/** 鏌ヨ鑰冩牳妯℃澘鍒楄〃 */
getList() {
this.tableLoading = true;
- detailScore(this.queryParams).then(response => {
+ detailScore(this.queryParamsList).then(response => {
this.tableData = response.rows;
this.total = response.total;
this.tableLoading = false;
@@ -173,6 +224,8 @@
path: '/examine/detail/detail',
query: {
id: id,
+ examineTag: this.activeIndex,
+ deptId: this.queryParamsList.deptId
}
})
},
@@ -206,7 +259,7 @@
series: [
{
name: '杞﹁締鑰冩牳',
- data: this.filterData(dataList, 0),
+ data: this.filterData(dataList, 2),
type: 'line',
itemStyle: {
color: 'rgba(62, 144, 247, 1)'
@@ -214,7 +267,7 @@
},
{
name: '浜鸿劯鑰冩牳',
- data: this.filterData(dataList, 1),
+ data: this.filterData(dataList, 3),
type: 'line',
itemStyle: {
color: 'rgba(85, 192, 191, 1)'
@@ -222,7 +275,7 @@
},
{
name: '瑙嗛鑰冩牳',
- data: this.filterData(dataList, 2),
+ data: this.filterData(dataList, 1),
type: 'line',
itemStyle: {
color: 'rgba(255, 165, 0, 1)'
@@ -262,6 +315,10 @@
},
getAllDay() {
+ // const date = new Date();
+ // const year = date.getFullYear();
+ // const month = (date.getMonth() + 1) >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1);
+ // this.date = year + '-' + month;
const currentDate = this.date.split('-');
const currentYear = currentDate[0];
const currentMonth = currentDate[1];
diff --git a/src/views/system/result/index.vue b/src/views/system/result/index.vue
index c08c57f..1d139c8 100644
--- a/src/views/system/result/index.vue
+++ b/src/views/system/result/index.vue
@@ -3,8 +3,8 @@
<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>
@@ -13,10 +13,6 @@
<div class="card-content">
<div class="title-container">
<h1>鑰冩牳鎴愮哗</h1>
- <div class="select-container">
- <el-date-picker v-model="date" type="date" placeholder="閫夋嫨鏃ユ湡">
- </el-date-picker>
- </div>
</div>
<div class="echart-container">
<div id="barChart" ref="barChart"></div>
@@ -39,9 +35,9 @@
</div>
<div v-for="(score, scoreIndex) in city" :key="scoreIndex">
<div class="score-item">
- <div v-if="score.examineCategory == 0">杞﹁締锛�</div>
- <div v-else-if="score.examineCategory == 1">浜鸿劯锛�</div>
- <div v-else-if="score.examineCategory == 2">瑙嗛锛�</div>
+ <div v-if="score.examineCategory == 2">杞﹁締锛�</div>
+ <div v-else-if="score.examineCategory == 3">浜鸿劯锛�</div>
+ <div v-else-if="score.examineCategory == 1">瑙嗛锛�</div>
<div class="score">{{ score.score }}</div>
</div>
</div>
@@ -77,8 +73,7 @@
},
checkScoreList: [],
areaList: [],
- activeIndex: '1',
- activeIndex2: '2',
+ activeIndex: '0',
date: '',
company: '',
dataList: {
@@ -95,6 +90,7 @@
}
},
created() {
+ this.queryParams.examineTag = this.activeIndex
this.getList();
this.areaSelect();
},
@@ -107,7 +103,8 @@
this.$router.push({
path: '/examine/detail',
query: {
- index: index
+ index: index,
+ examineTag: this.activeIndex
}
})
},
@@ -176,9 +173,9 @@
}
});
const nameArray = mapData.map(item => item.name);
- const data1 = this.filterData(mapData, 0);
- const data2 = this.filterData(mapData, 1);
- const data3 = this.filterData(mapData, 2);
+ const data1 = this.filterData(mapData, 1);
+ const data2 = this.filterData(mapData, 2);
+ const data3 = this.filterData(mapData, 3);
const option = {
grid: {
left: 0,
@@ -277,16 +274,12 @@
/** 瀵艰埅鍒囨崲 */
handleSelect(key) {
this.activeIndex = key; // 鏇存柊褰撳墠婵�娲荤殑鑿滃崟椤�
+ this.queryParams.examineTag = key;
this.getList();
},
/** 鏌ヨ鑰冩牳鎴愮哗鍒楄〃 */
getList() {
this.loading = true;
- if (this.activeIndex === '1') {
- this.queryParams.examineTag = '0'; // 鐪佸巺鑰冩牳
- } else if (this.activeIndex === '2') {
- this.queryParams.examineTag = '1'; // 鍖哄煙鑰冩牳
- }
// 鑾峰彇褰撳墠鏃ユ湡
const today = new Date();
@@ -310,7 +303,7 @@
const cityName = this.translateDeptId(parseInt(city[0].deptId));
this.province.publish = text === "鍙戝竷" ? "PUBLISHED" : "UNPUBLISHED";
this.province.id = city.map(city => city.id);
- this.$modal.confirm('鏄惁纭' + text + '鑰冩牳鍚嶄负"' + cityName + '"鐨勬暟鎹」锛�')
+ this.$modal.confirm('鏄惁纭' + text + '鑰冩牳鍚嶄负"' + cityName + '"鐨勬垚缁╋紵')
.then(() => {
return publishScore(this.province);
})
diff --git a/src/views/system/template/index.vue b/src/views/system/template/index.vue
index f6a88db..2e770c2 100644
--- a/src/views/system/template/index.vue
+++ b/src/views/system/template/index.vue
@@ -314,11 +314,11 @@
const faceRules = this.ruleList['faceRules']; // 浜鸿劯鐩稿叧鐨勮鍒欓泦鍚�
// 浣跨敤鏉′欢璇彞鏉ラ�夋嫨瑙勫垯鍒楄〃
- if (ruleListKey == 0) {
+ if (ruleListKey == 2) {
return carRules;
- } else if (ruleListKey == 1) {
+ } else if (ruleListKey == 3) {
return faceRules;
- } else if (ruleListKey == 2) {
+ } else if (ruleListKey == 1) {
return videoRules;
} else {
// 榛樿杩斿洖涓�涓┖鏁扮粍鎴栧閫夋柟妗�
--
Gitblit v1.8.0