Merge remote-tracking branch 'origin/yhkp' into 重点工程定位需求

# Conflicts:
#	src/components/OutSourced/index.vue
main
zhaoyu 2023-12-11 18:15:29 +08:00
commit 84a0e76a06
15 changed files with 2234 additions and 4 deletions

View File

@ -0,0 +1,220 @@
<template>
<div>
<div class="app-container">
<el-page-header content="查看详情" @back="goBack"/>
<table class="table-ui mt-20">
<tr>
<td class="tbg">隐患照片</td>
<td v-viewer>
<img v-for="(item,index) in pd.hiddenImgs" :key="index" :src="config.fileUrl + item.FILEPATH" alt="" style="width: 100px;height: 100px;margin-left: 10px;">
</td>
</tr>
<tr v-if="pd.hiddenVideos && pd.hiddenVideos.length !== 0 && pd.hiddenVideos[0].FILEPATH">
<td class="tbg">隐患视频</td>
<td>
<el-button icon="el-icon-video-camera" circle @click="goViewVideo(config.fileUrl + pd.hiddenVideos[0].FILEPATH)"/>
</td>
</tr>
<tr>
<td class="tbg">隐患描述</td>
<td>{{ pd.HIDDENDESCR }}</td>
</tr>
<tr>
<td class="tbg">隐患部位</td>
<td>{{ pd.HIDDENPART }}</td>
</tr>
<tr>
<td class="tbg">隐患级别</td>
<td>{{ pd.HIDDENLEVEL_NAME }}</td>
</tr>
<tr>
<td class="tbg">隐患类型</td>
<td>{{ pd.HIDDENTYPE_NAME }}</td>
</tr>
<tr>
<td class="tbg">隐患处置</td>
<td>限期整改</td>
</tr>
<tr>
<td class="tbg">整改期限</td>
<td>{{ pd.RECTIFICATIONDEADLINE }}</td>
</tr>
<tr>
<td class="tbg">整改部门</td>
<td>{{ pd.RECTIFICATIONDEPT_NAME }}</td>
</tr>
<tr>
<td class="tbg">整改人</td>
<td>{{ pd.RECTIFICATIONOR_NAME }}</td>
</tr>
<tr>
<td class="tbg">整改时间</td>
<td>{{ pd.RECTIFICATIONTIME }}</td>
</tr>
<tr>
<td class="tbg">整改照片</td>
<td v-viewer>
<img v-for="(item,index) in pd.zgImgs" :key="index" :src="config.fileUrl + item.FILEPATH" alt="" style="width: 100px;height: 100px;margin-left: 10px;">
</td>
</tr>
<tr v-if="pd.STATE === '4'">
<td class="tbg">验收时间</td>
<td>{{ pd.CHECKTIME }}</td>
</tr>
<tr v-if="pd.STATE === '4'">
<td class="tbg">验收图片</td>
<td v-viewer>
<img v-for="(item,index) in pd.ysImgs" :key="index" :src="config.fileUrl + item.FILEPATH" alt="" style="width: 100px;height: 100px;margin-left: 10px;">
</td>
</tr>
<tr v-if="pd.STATE === '4'">
<td class="tbg">是否进行罚款</td>
<td colspan="3">{{ pd.ISPUNISH === '1' ? '是' : '否' }}</td>
</tr>
</table>
<div v-if="projectEntity && projectEntity.KEYPROJECTPUNISH_ID">
<div style="font-weight: bold;margin-top: 20px">
罚款详情
</div>
<div>
<table class="table-ui mt-20">
<tr>
<td class="tbg">处罚原因</td>
<td>{{ projectEntity.REASON }}</td>
</tr>
<tr>
<td class="tbg">处罚金额</td>
<td>{{ projectEntity.AMOUT }}</td>
</tr>
<tr>
<td class="tbg">被处罚单位</td>
<td>{{ projectEntity.UNITS_NAME }}</td>
</tr>
<tr>
<td class="tbg">被处罚人</td>
<td>{{ projectEntity.PERSON_NAME }}</td>
</tr>
<tr>
<td class="tbg">下发人</td>
<td>{{ projectEntity.CREATOR_NAME }}</td>
</tr>
<tr>
<td class="tbg">下发处罚时间</td>
<td>{{ projectEntity.DATE }}</td>
</tr>
<tr v-if="projectEntity.HANDLED === '1'">
<td class="tbg">罚款缴纳单</td>
<td v-viewer>
<img :src="config.fileUrl + projectEntity.HANDLE_IMG" alt="" style="width: 100px;height: 100px;">
</td>
</tr>
<tr>
<td class="tbg">处罚处理人</td>
<td>{{ projectEntity.PERSON_NAME }}</td>
</tr>
<tr v-if="projectEntity.HANDLED === '1'">
<td class="tbg">处罚处理时间</td>
<td colspan="3">{{ projectEntity.HANLDE_TIME }}</td>
</tr>
<div class="ui-height" />
<div class="ui-foot">
<el-button icon="el-icon-arrow-left" @click="goBack"> </el-button>
</div>
</table>
</div>
</div>
</div>
<el-dialog :visible.sync="dialogViewVideo" title="视频" width="800px" @close="closePlay">
<div>
<video-player
ref="hdVideoPlayer"
:playsinline="true"
:options="playerOptions"
class="video-player vjs-custom-skin"/>
</div>
</el-dialog>
<div class="ui-height" />
<div class="ui-foot">
<el-button icon="el-icon-arrow-left" @click="goBack"> </el-button>
</div>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
import { videoPlayer } from 'vue-video-player'
import 'video.js/dist/video-js.css'
export default {
components: { videoPlayer },
props: {
activeName: {
type: String,
default: ''
}
},
data() {
return {
config,
pd: {},
projectEntity: {},
dialogViewVideo: false,
playerOptions: {
playbackRates: [0.5, 1.0, 1.5, 2.0], //
autoplay: false, // true,
muted: false, //
loop: false, //
preload: 'auto', // <video>auto,
language: 'zh-CN',
aspectRatio: '16:9', // 使 - "16:9""4:3"
fluid: true, // trueVideo.js player
sources: [{
type: 'video/mp4', //
src: '' // url
}],
poster: '', //
notSupportedMessage: '此视频暂无法播放,请稍后再试', // Video.js
controlBar: {
timeDivider: true, //
durationDisplay: true, //
remainingTimeDisplay: true, //
fullscreenToggle: true //
}
}
}
},
created() {
this.getData()
},
methods: {
getData() {
requestFN(
'/keyprojectcheck/findHidden',
{
HIDDEN_ID: this.$parent.HIDDEN_ID
}
).then((data) => {
this.pd = data.pd
this.projectEntity = data.pd.punishForm
})
},
goViewVideo(FILEPATH) {
this.playerOptions.sources[0].src = FILEPATH
this.dialogViewVideo = true
},
closePlay() {
this.$refs.hdVideoPlayer.player.pause()
},
goBack() {
if (this.activeName) {
this.$parent.activeName = this.activeName
} else {
this.$parent.activeName = 'List'
}
this.$parent.HIDDEN_ID = ''
}
}
}
</script>
<style scoped></style>

View File

@ -1,6 +1,9 @@
<template> <template>
<div> <div>
<component :is="activeName" /> <List v-show="activeName=='List'"/>
<Evaluation v-if="activeName=='Evaluation'"/>
<HiddenInfo v-if="activeName=='HiddenInfo'"/>
<!-- <component :is="activeName" />-->
</div> </div>
</template> </template>

View File

@ -0,0 +1,418 @@
<template>
<div class="app-container">
<el-form :model="searchForm" label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item label="隐患描述">
<el-input v-model="searchForm.hiddendescr" placeholder="请输入关键字"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="隐患来源">
<el-select v-model="searchForm.SOURCE" style="width: 100%;">
<el-option value="1" label="Ai报警"/>
<!-- <el-option value="3" label="清单排查"/>-->
<el-option value="4" label="安全环保检查(监管端)"/>
<el-option value="5" label="安全环保检查(企业端)"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="发现部门">
<Treeselect
:options="treeData"
:normalizer="normalizer"
v-model="searchForm.DEPARTMENT_ID"
placeholder="请选择发现部门"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="隐患发现人 ">
<el-input v-model="searchForm.KEYWORDS"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="隐患发现时间">
<el-date-picker
v-model="searchForm.dates"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 100%;"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<el-form-item label="考评状态">
<el-select v-model="searchForm.STATE" style="width: 100%;">
<el-option value="1" label="是"/>
<el-option value="2" label="否"/>
<el-option value="3" label="考评合格"/>
<el-option value="4" label="考评不合格"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="隐患类型">
<Treeselect
:options="hiddenTypeList"
:normalizer="normalizer"
:disable-branch-nodes="true"
v-model="searchForm.HIDDENTYPE"
placeholder="请选择隐患类型"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="本人是否考评">
<el-select v-model="searchForm.userIs" clearable style="width: 100%;">
<el-option value="1" label="是"/>
<el-option value="2" label="否"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves type="primary" icon="el-icon-search" @click="getList">
搜索
</el-button>
<el-button v-waves type="success" icon="el-icon-refresh" native-type="reset" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
v-loading="listLoading"
:data="varList"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column label="隐患来源">
<template slot-scope="{row}">
<span v-if="row.SOURCE=='1'">
Ai报警
</span>
<span v-else-if="row.SOURCE=='4'">
安全环保检查(监管端)
</span>
<span v-else-if="row.SOURCE=='5'">
安全环保检查(企业端)
</span>
</template>
</el-table-column>
<el-table-column prop="HIDDENDESCR" label="隐患描述"/>
<el-table-column prop="CREATTIME" label="隐患发现时间"/>
<el-table-column prop="CREATOR_NAME" label="隐患发现人"/>
<el-table-column label="隐患状态">已验收</el-table-column>
<el-table-column prop="CREATOR_NAME" label="隐患验收人">
<template slot-scope="{row}">
<span v-if="row.RECTIFICATIONTYPE=='1'">
--
</span>
<span v-else>
{{ row.CREATOR_NAME }}
</span>
</template>
</el-table-column>
<el-table-column prop="CHECK_USER" label="已考评组成员"/>
<el-table-column prop="UN_CHECK_USER" label="待考评组成员"/>
<el-table-column prop="PASS_STATUS" label="考评结果">
<template slot-scope="{row}">
<template v-if="row.CHECK_COUNT !== 5">
<span>考核未完成</span>
</template>
<template v-else>
<template v-if="row.PASS_COUNT > 2">
<span>考核合格</span>
</template>
<template v-else>
<span>考核不合格</span>
</template>
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="350px">
<template slot-scope="{row}">
<el-button type="info" icon="el-icon-view" @click="fnViewHidden(row.HIDDEN_ID)"></el-button>
<el-button type="primary" icon="el-icon-view" @click="fnEvaluation(row.HIDDEN_ID,row.SOURCE, row.CREATOR,'view')">考评详情</el-button>
<el-button
v-if="isEvaluationShowButton(row.UN_CHECK_USER_ID)"
type="success"
icon="el-icon-view"
@click="fnEvaluation(row.HIDDEN_ID,row.SOURCE, row.CREATOR,'edit')">考评
</el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button icon="el-icon-arrow-left" @click="goBack"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
<el-dialog :visible.sync="evaluationDialog.visible" title="考评">
<table class="table-ui">
<template v-for="item in evaluationDialog.list">
<tr :key="item.CONFIG_USER_ID">
<td class="tbg">考评人员</td>
<td>{{ item.USER_NAME }}</td>
<td class="tbg">是否符合</td>
<td>
<span v-if="item.RESULT === 1"></span>
<span v-if="item.RESULT === 2"></span>
<span v-if="!item.RESULT"></span>
</td>
</tr>
<tr v-if="item.RESULT === 2" :key="item.CONFIG_USER_ID">
<td class="tbg">不符合原因</td>
<td colspan="3">{{ item.DESCR }}</td>
</tr>
</template>
</table>
<el-form
v-if="evaluationDialog.type === 'edit'"
ref="evaluationDialogForm"
:model="evaluationDialog.form"
:rules="evaluationDialog.rules"
label-width="100px"
class="mt-20">
<el-form-item label="考评人员">
<el-input v-model="evaluationDialog.form.USER_NAME" disabled/>
</el-form-item>
<el-form-item label="是否符合" prop="RESULT">
<el-select v-model="evaluationDialog.form.RESULT" style="width: 100%;">
<el-option value="1" label="符合"/>
<el-option value="2" label="不符合"/>
</el-select>
</el-form-item>
<el-form-item v-if="evaluationDialog.form.RESULT === '2'" label="不符合原因" prop="DESCR">
<el-input v-model="evaluationDialog.form.DESCR" type="textarea" autosize/>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="fnEvaluationDialogChangeShow"></el-button>
<el-button v-if="evaluationDialog.type === 'edit'" type="primary" @click="fnEvaluationDialogSubmit"></el-button>
</template>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
components: { Pagination, Treeselect },
directives: { waves },
data() {
return {
total: 0,
varList: [],
USER_ID: JSON.parse(sessionStorage.getItem('user')).USER_ID,
listQuery: {
page: 1,
limit: 20
},
normalizer(node) {
return {
id: node.id,
label: node.name,
children: node.nodes
}
},
treeData: [],
hiddenTypeList: [],
listLoading: false, //
searchForm: {
KEYWORDS: '',
SOURCE: '',
HIDDENTYPE: null,
dates: [],
DEPARTMENT_ID: null,
STATE: '',
hiddendescr: '',
userIs: ''
},
evaluationDialog: {
visible: false,
type: '',
HIDDEN_ID: '',
SOURCE: '',
CREATOR: '',
form: {
EVALUATIONCONFIGINFO_ID: '',
USER_NAME: '',
DESCR: '',
RESULT: ''
},
rules: {
RESULT: [{ required: true, message: '请选择是否符合', trigger: 'change' }],
DESCR: [{ required: true, message: '请输入不符合原因', trigger: 'blur' }]
},
list: []
},
visible: false,
HIDDEN_ID: ''
}
},
created() {
this.getList()
this.getTreeData()
},
methods: {
//
getTreeData() {
requestFN(
'/corpDepartment/listTreeManageAndCorp',
{}
).then((data) => {
const treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
this.treeData = this.removeEmptyChildren(treeData)
}).catch((e) => {
})
requestFN(
'/dictionaries/listSelectTree',
{
DICTIONARIES_ID: '3babc15144444bdc8d763d0af2bdfff6'
}
).then((data) => {
this.hiddenTypeList = this.removeEmptyChildren(JSON.parse(data.zTreeNodes))
})
},
goKeyReset() {
this.searchForm.KEYWORDS = ''
this.searchForm.SOURCE = ''
this.searchForm.HIDDENTYPE = null
this.searchForm.dates = []
this.searchForm.DEPARTMENT_ID = null
this.searchForm.STATE = ''
this.searchForm.hiddendescr = ''
this.searchForm.userIs = ''
this.getList()
},
//
getList() {
this.listLoading = true
requestFN(
'keyProject/hiddenevaluationrecord/hiddenList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchForm,
START_TIME: this.searchForm.dates && this.searchForm.dates[0],
END_TIME: this.searchForm.dates && this.searchForm.dates[1],
CORPINFO_ID: this.$parent.CORPINFO_ID,
EVALUATIONCONFIG_ID: this.$parent.EVALUATIONCONFIG_ID,
TYPE: this.$parent.TYPE
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
isEvaluationShowButton(UN_CHECK_USER_ID) {
if (!UN_CHECK_USER_ID) return false
else {
return UN_CHECK_USER_ID.split(',').indexOf(this.USER_ID) !== -1
}
},
goBack() {
this.$parent.activeName = 'List'
},
fnViewHidden(HIDDEN_ID) {
// this.visible = true
// this.HIDDEN_ID = HIDDEN_ID
this.$parent.HIDDEN_ID = HIDDEN_ID
this.$parent.activeName = 'KeyProjectHidden'
},
fnEvaluationDialogChangeShow() {
this.evaluationDialog.visible = !this.evaluationDialog.visible
},
fnEvaluation(HIDDEN_ID, SOURCE, CREATOR, type) {
this.evaluationDialog.HIDDEN_ID = HIDDEN_ID
this.evaluationDialog.SOURCE = SOURCE
this.evaluationDialog.CREATOR = CREATOR
this.evaluationDialog.type = type
this.evaluationDialog.list = []
this.fnEvaluationDialogChangeShow()
if (type === 'edit') {
this.$nextTick(() => {
this.$refs.evaluationDialogForm.resetFields()
})
}
requestFN(
'keyProject/hiddenevaluationrecord/goEdit',
{
HIDDEN_ID,
EVALUATIONCONFIG_ID: this.$parent.EVALUATIONCONFIG_ID
}
).then((data) => {
const list = []
for (let i = 0; i < data.varList.length; i++) {
if (type === 'edit') {
if (data.varList[i].CONFIG_USER_ID !== this.USER_ID) {
list.push(data.varList[i])
} else {
this.evaluationDialog.form.EVALUATIONCONFIGINFO_ID = data.varList[i].CONFIG_EVALUATIONCONFIGINFO_ID
this.evaluationDialog.form.USER_NAME = data.varList[i].USER_NAME
this.evaluationDialog.form.DESCR = ''
this.evaluationDialog.form.RESULT = ''
}
} else {
list.push(data.varList[i])
}
}
this.evaluationDialog.list = list
}).catch((e) => {
})
},
fnEvaluationDialogSubmit() {
this.$refs.evaluationDialogForm.validate((valid) => {
if (valid) {
requestFN(
'keyProject/hiddenevaluationrecord/add',
{
CORPINFO_ID: this.$parent.CORPINFO_ID,
HIDDENTYPE: this.$parent.TYPE,
EVALUATIONCONFIG_ID: this.$parent.EVALUATIONCONFIG_ID,
SOURCE: this.evaluationDialog.SOURCE,
USER_ID: this.evaluationDialog.CREATOR,
HIDDEN_ID: this.evaluationDialog.HIDDEN_ID,
...this.evaluationDialog.form
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('保存成功')
this.fnEvaluationDialogChangeShow()
this.getList()
}
}).catch((e) => {
})
}
})
}
}
}
</script>
<style lang="sass" scoped>
</style>

View File

@ -0,0 +1,142 @@
<template>
<div class="app-container">
<el-form :model="searchForm" label-width="120px">
<el-row>
<el-col :span="4">
<el-form-item label="分公司名称">
<el-input v-model="searchForm.KEYWORDS" placeholder="请输入关键字"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="隐患考评组类型">
<el-select v-model="searchForm.TYPE" style="width: 100%;">
<el-option value="1" label="安全类"/>
<el-option value="2" label="环保类"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="考评组成员">
<el-input v-model="searchForm.USER_NAME" placeholder="请输入关键字"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves type="primary" icon="el-icon-search" @click="getList">
搜索
</el-button>
<el-button v-waves type="success" icon="el-icon-refresh" native-type="reset" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
v-loading="listLoading"
:data="varList"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="CORP_NAME" label="分公司名称"/>
<el-table-column label="隐患考评组类型">
<template slot-scope="{row}">
{{ row.TYPE === 1 ? '安全类' : '环保类' }}
</template>
</el-table-column>
<el-table-column label="Ai报警奖惩">
<template slot-scope="{row}">
{{ row.checked_count1 }} / {{ row.count1 }}
</template>
</el-table-column>
<el-table-column label="重点工程安全环保奖惩监管端">
<template slot-scope="{row}">
{{ row.checked_count2 }} / {{ row.count2 }}
</template>
</el-table-column>
<el-table-column label="重点工程安全环保奖惩企业端">
<template slot-scope="{row}">
{{ row.checked_count3 }} / {{ row.count3 }}
</template>
</el-table-column>
<el-table-column prop="CHECK_USER" label="考评组成员"/>
<el-table-column label="操作" width="100px">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-view" @click="fnEvaluation(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
components: { Pagination, Treeselect },
directives: { waves },
data() {
return {
total: 0,
varList: [],
KEYWORDS: '',
listQuery: {
page: 1,
limit: 20
},
listLoading: false, //
searchForm: {
KEYWORDS: '',
TYPE: '',
USER_NAME: ''
}
}
},
created() {
this.getList()
},
methods: {
goKeyReset() {
this.searchForm.KEYWORDS = ''
this.searchForm.TYPE = ''
this.searchForm.USER_NAME = ''
this.getList()
},
//
getList() {
this.listLoading = true
requestFN(
'keyProject/hiddenevaluationrecord/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchForm
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
fnEvaluation({ CORPINFO_ID, EVALUATIONCONFIG_ID, TYPE }) {
this.$parent.CORPINFO_ID = CORPINFO_ID
this.$parent.EVALUATIONCONFIG_ID = EVALUATIONCONFIG_ID
this.$parent.TYPE = TYPE
this.$parent.activeName = 'Evaluation'
}
}
}
</script>
<style lang="sass" scoped>
</style>

View File

@ -0,0 +1,34 @@
<template>
<div>
<List v-show="activeName=='List'"/>
<Evaluation v-if="activeName=='Evaluation'"/>
<KeyProjectHidden v-if="activeName=='KeyProjectHidden'" active-name="Evaluation"/>
</div>
</template>
<script>
import List from './components/list'
import Evaluation from './components/evaluation'
// import HiddenInfo from './components/hidden_info.vue'
import KeyProjectHidden from '@/components/KeyProjectHidden/index'
export default {
components: {
List,
Evaluation,
KeyProjectHidden
},
data() {
return {
activeName: 'List',
CORPINFO_ID: '',
EVALUATIONCONFIG_ID: '',
HIDDEN_ID: '',
TYPE: ''
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,387 @@
<template>
<div class="app-container">
<el-form :model="searchForm" label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item label="分公司名称">
<el-input v-model="searchForm.KEYWORDS" placeholder="请输入关键字"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="考评组状态">
<el-select v-model="searchForm.TYPE" style="width: 100%;">
<el-option value="1" label="安全类已分配"/>
<el-option value="2" label="安全类未分配"/>
<el-option value="3" label="环保类已分配"/>
<el-option value="4" label="环保类未分配"/>
<el-option value="5" label="安全类和环保类已分配"/>
<el-option value="6" label="安全类和环保类未分配"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves type="primary" icon="el-icon-search" @click="getList">
搜索
</el-button>
<el-button v-waves type="success" icon="el-icon-refresh" native-type="reset" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
v-loading="listLoading"
:data="varList"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="CORP_NAME" label="分公司名称"/>
<el-table-column label="安全类隐患考评组分配状态">
<template slot-scope="{row}">
{{ row.TYPES && row.TYPES.indexOf('1') !== -1 ? '已分配' : '未分配' }}
</template>
</el-table-column>
<el-table-column prop="AQ_USERS" label="考评组成员"/>
<el-table-column prop="FIRE_CHECK_TYPE" label="环保类隐患考评组分配状态">
<template slot-scope="{row}">
{{ row.TYPES && row.TYPES.indexOf('2') !== -1 ? '已分配' : '未分配' }}
</template>
</el-table-column>
<el-table-column prop="HB_USERS" label="考评组成员"/>
<el-table-column label="操作" width="480px">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-view" @click="fnViewAssignGroup(row)"></el-button>
<el-button type="success" icon="el-icon-tickets" @click="fnAssignGroup(row.CORPINFO_ID,'1')">
</el-button>
<el-button type="success" icon="el-icon-tickets" @click="fnAssignGroup(row.CORPINFO_ID,'2')">
</el-button>
<el-button type="info" icon="el-icon-tickets" @click="fnChangeRecord(row.CORPINFO_ID)">
</el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
<el-dialog
:visible.sync="assignGroupDialog.visible"
:title="assignGroupDialog.type === '1' ? '安全类隐患考评组分配' : '环保类隐患考评组分配'">
<el-form ref="assignGroupDialogForm" :model="assignGroupDialog.form" label-width="100px">
<el-form-item label="隐患类型">
<el-input :value="assignGroupDialog.type === '1' ? '安全类' : '环保类'" disabled/>
</el-form-item>
<el-row v-for="(item,index) in assignGroupDialog.form.other" :key="index">
<el-col :span="12">
<el-form-item
:prop="'other.' + index + '.DEPARTMENT_ID'"
:rules="{
required: true, message: '考评部门不能为空', trigger: 'blur'
}"
label="考评部门">
<Treeselect
:options="treeData"
:normalizer="normalizer"
v-model="item.DEPARTMENT_ID"
placeholder="请选择考评部门"
no-options-text="暂无数据"
no-children-text="暂无数据"
@select="item.USER_ID = '';getUserList($event,index)"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
:prop="'other.' + index + '.USER_ID'"
:rules="{
required: true, message: '考评人员不能为空', trigger: 'blur'
}"
label="考评人员">
<el-select :value="item.USER_ID" clearable placeholder="请选择" style="width: 100%;" @change="acceptedByChange($event,index)">
<el-option
v-for="item1 in item.userList"
:key="item1.USER_ID"
:label="item1.NAME"
:value="item1.USER_ID"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template slot="footer">
<el-button @click="fnAssignGroupDialogChangeShow"></el-button>
<el-button type="primary" @click="fnAssignGroupDialogSubmit"></el-button>
</template>
</el-dialog>
<el-dialog
:visible.sync="viewAssignGroupDialog.visible"
title="查看">
<table class="table-ui">
<tr>
<td class="tbg">隐患类型</td>
<td>安全类</td>
</tr>
<tr>
<td class="tbg">考评组成员</td>
<td>{{ viewAssignGroupDialog.info.AQ_USERS }}</td>
</tr>
<tr>
<td class="tbg">隐患类型</td>
<td>环保类</td>
</tr>
<tr>
<td class="tbg">考评组成员</td>
<td>{{ viewAssignGroupDialog.info.HB_USERS }}</td>
</tr>
</table>
<template slot="footer">
<el-button @click="viewAssignGroupDialog.visible = false">关闭</el-button>
</template>
</el-dialog>
<el-dialog
:visible.sync="changeRecordDialog.visible"
title="变更记录">
<table class="table-ui">
<tr v-for="(item,index) in changeRecordDialog.list" :key="index">
<td class="tbg">隐患类型</td>
<td>{{ item.TYPE === 1 ? '安全类' : '环保类' }}</td>
<td class="tbg">变更前</td>
<td>{{ item.OLD_USER_NAME }}</td>
<td class="tbg">变更后</td>
<td>{{ item.NEW_USER_NAME }}</td>
</tr>
</table>
<template slot="footer">
<el-button @click="changeRecordDialog.visible = false">关闭</el-button>
</template>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { differenceBy, cloneDeep } from 'lodash'
export default {
components: { Pagination, Treeselect },
directives: { waves },
data() {
return {
total: 0,
varList: [],
treeData: [],
normalizer(node) {
return {
id: node.id,
label: node.name,
children: node.nodes
}
},
KEYWORDS: '',
listQuery: {
page: 1,
limit: 20
},
listLoading: false, //
searchForm: {},
assignGroupDialog: {
visible: false,
type: '',
CORPINFO_ID: '',
editType: '',
form: {
other: [
{ DEPARTMENT_ID: null, USER_ID: '', userList: [] },
{ DEPARTMENT_ID: null, USER_ID: '', userList: [] },
{ DEPARTMENT_ID: null, USER_ID: '', userList: [] },
{ DEPARTMENT_ID: null, USER_ID: '', userList: [] },
{ DEPARTMENT_ID: null, USER_ID: '', userList: [] }
]
},
oldOther: []
},
viewAssignGroupDialog: {
visible: false,
info: {
AQ_USERS: '',
HB_USERS: ''
}
},
changeRecordDialog: {
visible: false,
list: []
}
}
},
created() {
this.getList()
this.getTreeData()
},
methods: {
goKeyReset() {
this.searchForm.KEYWORDS = ''
this.searchForm.TYPE = ''
this.getList()
},
getUserList(event, index) { //
requestFN(
'/user/listAll',
{
DEPARTMENT_ID: event.id,
tm: new Date().getTime()
}
).then((data) => {
if (this.assignGroupDialog.form.other[index].userList) {
this.assignGroupDialog.form.other[index].userList = data.userList
} else {
this.$set(this.assignGroupDialog.form.other[index], 'userList', data.userList)
}
}).catch((e) => {
})
},
acceptedByChange(event, index) {
let flag = false
for (let i = 0; i < this.assignGroupDialog.form.other.length; i++) {
if (this.assignGroupDialog.form.other[i].USER_ID === event) {
flag = true
break
}
}
if (flag) {
this.$message.warning('不能选择重复的考评人')
} else {
this.assignGroupDialog.form.other[index].USER_ID = event
}
},
//
getTreeData() {
requestFN(
'/department/listTree',
{}
).then((data) => {
this.treeData = this.removeEmptyChildren(JSON.parse(data.zTreeNodes))
}).catch((e) => {
})
},
//
getList() {
this.listLoading = true
requestFN(
'keyProject/evaluationconfig/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchForm
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
fnAssignGroupDialogChangeShow() {
this.assignGroupDialog.visible = !this.assignGroupDialog.visible
},
fnAssignGroup(CORPINFO_ID, type) {
this.assignGroupDialog.CORPINFO_ID = CORPINFO_ID
this.assignGroupDialog.type = type
this.fnAssignGroupDialogChangeShow()
this.$nextTick(() => {
this.$refs.assignGroupDialogForm.resetFields()
})
requestFN(
'keyProject/evaluationconfig/goEdit',
{
CORPINFO_ID,
TYPE: type
}
).then((data) => {
if (data.result === 'success') {
if (data.varlist.length === 0) {
this.assignGroupDialog.editType = 'add'
} else {
this.assignGroupDialog.editType = 'edit'
this.assignGroupDialog.form.other = cloneDeep(data.varlist)
this.assignGroupDialog.oldOther = cloneDeep(data.varlist)
for (let i = 0; i < data.varlist.length; i++) {
this.getUserList({ id: data.varlist[i].DEPARTMENT_ID }, i)
}
}
}
}).catch((e) => {
})
},
fnAssignGroupDialogSubmit() {
this.$refs.assignGroupDialogForm.validate(valid => {
if (valid) {
if (this.assignGroupDialog.editType === 'add') {
requestFN(
'keyProject/evaluationconfig/add',
{
CORPINFO_ID: this.assignGroupDialog.CORPINFO_ID,
TYPE: this.assignGroupDialog.type,
users: JSON.stringify(this.assignGroupDialog.form.other)
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('保存成功')
this.fnAssignGroupDialogChangeShow()
this.getList()
}
}).catch((e) => {
})
} else {
const changeUsers = differenceBy(this.assignGroupDialog.form.other, this.assignGroupDialog.oldOther, 'USER_ID')
console.log(changeUsers)
requestFN(
'keyProject/evaluationconfig/edit',
{
CORPINFO_ID: this.assignGroupDialog.CORPINFO_ID,
TYPE: this.assignGroupDialog.type,
changeUsers: JSON.stringify(changeUsers)
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('保存成功')
this.fnAssignGroupDialogChangeShow()
this.getList()
}
}).catch((e) => {
})
}
} else {
this.$message.warning('请补全必填项')
}
})
},
fnViewAssignGroup(row) {
this.viewAssignGroupDialog.info = row
this.viewAssignGroupDialog.visible = true
},
fnChangeRecord(CORPINFO_ID) {
requestFN(
'keyProject/evaluationconfig/changeLogs',
{
CORPINFO_ID
}
).then((data) => {
console.log(data.varlist)
this.changeRecordDialog.list = data.varlist
this.changeRecordDialog.visible = true
}).catch((e) => {
})
}
}
}
</script>
<style lang="sass" scoped>
</style>

View File

@ -0,0 +1,22 @@
<template>
<div>
<component :is="activeName" />
</div>
</template>
<script>
import List from './components/list'
export default {
components: {
List: List
},
data() {
return {
activeName: 'List'
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,283 @@
<template>
<div class="app-container">
<el-form :model="searchForm" label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item label="隐患来源">
<el-select v-model="searchForm.SOURCE" style="width: 100%;">
<el-option value="1" label="Ai报警"/>
<!-- <el-option value="3" label="清单排查"/>-->
<el-option value="4" label="安全环保检查(监管端)"/>
<el-option value="5" label="安全环保检查(企业端)"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发现部门">
<Treeselect
:options="treeData"
:normalizer="normalizer"
v-model="searchForm.DEPARTMENT_ID"
placeholder="请选择发现部门"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="隐患发现人">
<el-input v-model="searchForm.KEYWORDS"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="隐患类型">
<Treeselect
:options="hiddenTypeList"
:normalizer="normalizer"
:disable-branch-nodes="true"
v-model="searchForm.HIDDENTYPE"
placeholder="请选择隐患类型"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="兑换时间">
<el-date-picker
v-model="searchForm.dates"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 100%;"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label-width="10px">
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves type="success" icon="el-icon-refresh" native-type="reset" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
v-loading="listLoading"
:data="varList"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column label="隐患来源">
<template slot-scope="{row}">
<span v-if="row.SOURCE=='1'">
Ai报警
</span>
<span v-else-if="row.SOURCE=='4'">
安全环保检查(监管端)
</span>
<span v-else-if="row.SOURCE=='5'">
安全环保检查(企业端)
</span>
</template>
</el-table-column>
<el-table-column prop="HIDDENDESCR" label="隐患描述"/>
<el-table-column prop="CREATTIME" label="隐患发现时间"/>
<el-table-column prop="CREATOR_NAME" label="隐患发现人"/>
<el-table-column label="隐患状态">已验收</el-table-column>
<el-table-column prop="CREATOR_NAME" label="隐患验收人">
<template slot-scope="{row}">
<!-- <span v-if="row.RECTIFICATIONTYPE=='2'">-->
<!-- {{ row.YQ_CHECKOR_NAME }}-->
<!-- </span>-->
<!-- <span v-else>-->
<!-- {{ row.CHECKOR_NAME }}-->
<!-- </span>-->
<span>
{{ row.CREATOR_NAME }}
</span>
</template>
</el-table-column>
<el-table-column prop="CHECK_USER" label="考评组成员"/>
<el-table-column label="兑换状态">
<template slot-scope="{row}">
{{ row.EVALUATIONSCOREEXCHANGE_ID ? '已兑换' : '未兑换' }}
</template>
</el-table-column>
<el-table-column label="操作" width="260px">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-view" @click="fnDetailsOfHiddenDangers(row.HIDDEN_ID)"></el-button>
<el-button type="success" icon="el-icon-view" @click="fnAssessmentDetails(row.HIDDEN_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button icon="el-icon-arrow-left" @click="goBack"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
<el-dialog :visible.sync="evaluationDialog.visible" title="考评详情">
<table class="table-ui">
<template v-for="item in evaluationDialog.list">
<tr :key="item.CONFIG_USER_ID">
<td class="tbg">考评人员</td>
<td>{{ item.USER_NAME }}</td>
<td class="tbg">是否符合</td>
<td>
<span v-if="item.RESULT === 1"></span>
<span v-if="item.RESULT === 2"></span>
<span v-if="!item.RESULT"></span>
</td>
</tr>
<tr v-if="item.RESULT === 2" :key="item.CONFIG_USER_ID">
<td class="tbg">不符合原因</td>
<td colspan="3">{{ item.DESCR }}</td>
</tr>
</template>
</table>
<template slot="footer">
<el-button @click="evaluationDialog.visible = false">关闭</el-button>
</template>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
components: { Pagination, Treeselect },
directives: { waves },
data() {
return {
total: 0,
varList: [],
treeData: [],
hiddenTypeList: [],
normalizer(node) {
return {
id: node.id,
label: node.name,
children: node.nodes
}
},
KEYWORDS: '',
listQuery: {
page: 1,
limit: 20
},
listLoading: false, //
searchForm: {
KEYWORDS: '',
SOURCE: '',
DEPARTMENT_ID: null,
HIDDENTYPE: null,
dates: []
},
evaluationDialog: {
visible: false,
list: []
}
}
},
created() {
this.getList()
this.getTreeData()
},
methods: {
//
getQuery() {
this.getList()
},
goKeyReset() {
this.searchForm.KEYWORDS = ''
this.searchForm.SOURCE = ''
this.searchForm.DEPARTMENT_ID = null
this.searchForm.HIDDENTYPE = null
this.searchForm.dates = []
this.getList()
},
//
getTreeData() {
requestFN(
'/corpDepartment/listTreeManageAndCorp',
{}
).then((data) => {
const treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
this.treeData = this.removeEmptyChildren(treeData)
}).catch((e) => {
})
requestFN(
'/dictionaries/listSelectTree',
{
DICTIONARIES_ID: '3babc15144444bdc8d763d0af2bdfff6'
}
).then((data) => {
this.hiddenTypeList = this.removeEmptyChildren(JSON.parse(data.zTreeNodes))
})
},
//
getList() {
this.listLoading = true
requestFN(
'keyProject/evaluationscore/exchangeHiddenList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchForm,
START_TIME: this.searchForm.dates[0] && this.searchForm.dates[0] + ' 00:00:00',
END_TIME: this.searchForm.dates[1] && this.searchForm.dates[1] + ' 23:59:59',
EVALUATIONSCOREEXCHANGE_ID: this.$parent.EVALUATIONSCOREEXCHANGE_ID,
USER_ID: this.$parent.USER_ID,
CORPINFO_ID: this.$parent.CORPINFO_ID
}
).then((data) => {
this.listLoading = false
console.log(data.varList)
if (data.varList) {
this.varList = data.varList
}else {
this.varList = []
}
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
fnAssessmentDetails(HIDDEN_ID) {
requestFN(
'keyProject/evaluationscore/getHiddenEvaluation',
{
HIDDEN_ID
}
).then((data) => {
this.evaluationDialog.list = data.varList
this.evaluationDialog.visible = true
}).catch((e) => {
})
},
fnDetailsOfHiddenDangers(HIDDEN_ID) {
this.$parent.HIDDEN_ID = HIDDEN_ID
this.$parent.activeName = 'KeyProjectHidden'
},
goBack() {
this.$parent.activeName = this.$parent.HiddenListEntrance
}
}
}
</script>
<style lang="sass" scoped>
</style>

View File

@ -0,0 +1,155 @@
<template>
<div class="app-container">
<el-form :model="searchForm" label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item label="考核部门">
<Treeselect
:options="treeData"
:normalizer="normalizer"
v-model="searchForm.DEPARTMENT_ID"
placeholder="请选择考核部门"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="考核部门人员">
<el-input v-model="searchForm.KEYWORDS" placeholder="请输入关键字"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves type="primary" icon="el-icon-search" @click="getList">
搜索
</el-button>
<el-button v-waves type="success" icon="el-icon-refresh" native-type="reset" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
v-loading="listLoading"
:data="varList"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="CORP_NAME" label="单位名称"/>
<el-table-column label="完成考评隐患数">
<template slot-scope="{row}">
{{ row.checked_count1 + row.checked_count2 + row.checked_count3 }}
</template>
</el-table-column>
<el-table-column label="待考评隐患数">
<template slot-scope="{row}">
{{ (row.count1 + row.count2 + row.count3 ) - (row.checked_count1 + row.checked_count2 + row.checked_count3 ) }}
</template>
</el-table-column>
<el-table-column prop="SCORE_USERS" label="涉及奖励人数"/>
<el-table-column label="奖励兑换情况">
<template slot-scope="{row}">
{{ row.USERD_SCORE }} / {{ row.TOTAL_SCORE }}
</template>
</el-table-column>
<el-table-column prop="AQ_USERS" label="安全类隐患考评组成员"/>
<el-table-column prop="HB_USERS" label="环保类隐患考评组成员"/>
<el-table-column label="操作" width="100px">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-view" @click="fnView(row.CORPINFO_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
components: { Pagination, Treeselect },
directives: { waves },
data() {
return {
total: 0,
varList: [],
treeData: [],
normalizer(node) {
return {
id: node.id,
label: node.name,
children: node.nodes
}
},
KEYWORDS: '',
listQuery: {
page: 1,
limit: 20
},
listLoading: false, //
searchForm: {
KEYWORDS: '',
TYPE: '',
DEPARTMENT_ID: null
}
}
},
created() {
this.getList()
this.getTreeData()
},
methods: {
goKeyReset() {
this.searchForm.KEYWORDS = ''
this.searchForm.TYPE = ''
this.searchForm.DEPARTMENT_ID = null
this.getList()
},
//
getTreeData() {
requestFN(
'/department/listTree',
{}
).then((data) => {
this.treeData = this.removeEmptyChildren(JSON.parse(data.zTreeNodes))
}).catch((e) => {
})
},
//
getList() {
this.listLoading = true
requestFN(
'/keyProject/evaluationscore/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchForm
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
fnView(CORPINFO_ID) {
this.$parent.CORPINFO_ID = CORPINFO_ID
this.$parent.activeName = 'PersonnelList'
}
}
}
</script>
<style lang="sass" scoped>
</style>

View File

@ -0,0 +1,253 @@
<template>
<div class="app-container">
<el-form :model="searchForm" label-width="80px">
<el-row>
<el-col :span="4">
<el-form-item label="考核部门">
<Treeselect
:options="treeData"
:normalizer="normalizer"
v-model="searchForm.DEPARTMENT_ID"
placeholder="请选择考核部门"
no-options-text="暂无数据"
no-children-text="暂无数据"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="姓名">
<el-input v-model="searchForm.KEYWORDS" placeholder="请输入关键字"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="时间">
<el-date-picker
v-model="searchForm.dates"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 100%;"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves type="success" icon="el-icon-refresh" native-type="reset" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="USERNAME" label="用户名"/>
<el-table-column prop="NAME" label="姓名"/>
<el-table-column prop="DEPTMENT_NAME" label="部门"/>
<el-table-column prop="PORT_NAME" label="岗位"/>
<el-table-column prop="TOTAL_SCORE" label="奖励总得分"/>
<el-table-column prop="USERD_SCORE" label="已兑换分数"/>
<el-table-column label="未兑换奖励数">
<template slot-scope="{row}">
{{ row.TOTAL_SCORE - row.USERD_SCORE }}
</template>
</el-table-column>
<el-table-column label="操作" width="240px">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-view" @click="fnRedemptionRecords(row.USER_ID)"></el-button>
<el-button type="success" icon="el-icon-view" @click="fnAssessmentDetails(row.USER_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button icon="el-icon-arrow-left" @click="goBack"></el-button>
<el-button type="primary" icon="el-icon-check" @click="batchRedemption"></el-button>
<el-button type="success" icon="el-icon-folder-checked" @click="redeemAll"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
components: { Pagination, Treeselect },
directives: { waves },
data() {
return {
total: 0,
varList: [],
treeData: [],
normalizer(node) {
return {
id: node.id,
label: node.name,
children: node.nodes
}
},
KEYWORDS: '',
listQuery: {
page: 1,
limit: 20
},
listLoading: false, //
searchForm: {
KEYWORDS: '',
DEPARTMENT_ID: null,
dates: []
}
}
},
created() {
this.getList()
this.getTreeData()
},
methods: {
getRowKey(row) {
return row.USER_ID
},
//
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
goKeyReset() {
this.searchForm.KEYWORDS = ''
this.searchForm.DEPARTMENT_ID = null
this.searchForm.dates = []
this.getList()
},
//
getTreeData() {
requestFN(
'/corpDepartment/listTreeManageAndCorp',
{}
).then((data) => {
const treeData = this.listTransTree(JSON.parse(data.zTreeNodes), 'id', 'pId', 'nodes')
for (let i = 0; i < treeData.length; i++) {
if (treeData[i].id === this.$parent.CORPINFO_ID) {
this.treeData = this.removeEmptyChildren([treeData[i]])
break
}
}
}).catch((e) => {
})
},
//
getList() {
this.listLoading = true
requestFN(
'keyProject/evaluationscore/userList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchForm,
START_TIME: this.searchForm.dates[0] && this.searchForm.dates[0] + ' 00:00:00',
END_TIME: this.searchForm.dates[1] && this.searchForm.dates[1] + ' 23:59:59',
CORPINFO_ID: this.$parent.CORPINFO_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
batchRedemption() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData.length === 0) {
this.$message.warning('请选择需要兑换的人员')
return
}
this.$confirm('确定要兑换吗?', '提示', {
type: 'warning'
}).then(() => {
const user_ids = _selectData.map(item => item.USER_ID).join(',')
requestFN(
'keyProject/evaluationscore/exchange',
{
user_ids,
CORPINFO_ID: this.$parent.CORPINFO_ID,
START_TIME: this.searchForm.dates[0] && this.searchForm.dates[0] + ' 00:00:00',
END_TIME: this.searchForm.dates[1] && this.searchForm.dates[1] + ' 23:59:59'
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('兑换成功')
this.getQuery()
}
}).catch((e) => {
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消兑换'
})
})
},
redeemAll() {
this.$confirm('确定要兑换所有人得分吗?', '提示', {
type: 'warning'
}).then(() => {
requestFN(
'keyProject/evaluationscore/exchange',
{
CORPINFO_ID: this.$parent.CORPINFO_ID,
START_TIME: this.searchForm.dates[0] && this.searchForm.dates[0] + ' 00:00:00',
END_TIME: this.searchForm.dates[1] && this.searchForm.dates[1] + ' 23:59:59'
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('兑换成功')
this.getQuery()
}
}).catch((e) => {
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消兑换'
})
})
},
fnRedemptionRecords(USER_ID) {
this.$parent.USER_ID = USER_ID
this.$parent.activeName = 'RedemptionRecords'
},
fnAssessmentDetails(USER_ID) {
this.$parent.USER_ID = USER_ID
this.$parent.EVALUATIONSCOREEXCHANGE_ID = ''
this.$parent.activeName = 'HiddenList'
this.$parent.HiddenListEntrance = 'PersonnelList'
},
goBack() {
this.$parent.activeName = 'List'
}
}
}
</script>
<style lang="sass" scoped>
</style>

View File

@ -0,0 +1,127 @@
<template>
<div class="app-container">
<el-form :model="searchForm" label-width="80px">
<el-row>
<el-col :span="8">
<el-form-item label="兑换时间">
<el-date-picker
v-model="searchForm.dates"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 100%;"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves type="success" icon="el-icon-refresh" native-type="reset" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
v-loading="listLoading"
:data="varList"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="CREATTIME" label="兑换时间"/>
<el-table-column prop="CREATOR" label="兑换操作人员"/>
<el-table-column prop="SCORE" label="兑换隐患数"/>
<el-table-column prop="SCORE" label="兑换积分"/>
<el-table-column prop="LAST_SCORE" label="剩余积分数"/>
<el-table-column label="操作" width="120px">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-view" @click="fnDetailsOfHiddenDangers(row.EVALUATIONSCOREEXCHANGE_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button icon="el-icon-arrow-left" @click="goBack"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
components: { Pagination, Treeselect },
directives: { waves },
data() {
return {
total: 0,
varList: [],
KEYWORDS: '',
listQuery: {
page: 1,
limit: 20
},
listLoading: false, //
searchForm: {
dates: []
}
}
},
created() {
this.getList()
},
methods: {
//
getQuery() {
this.getList()
},
goKeyReset() {
this.searchForm.dates = []
this.getList()
},
//
getList() {
this.listLoading = true
requestFN(
'keyProject/evaluationscore/exchangeList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchForm,
START_TIME: this.searchForm.dates[0] && this.searchForm.dates[0] + ' 00:00:00',
END_TIME: this.searchForm.dates[1] && this.searchForm.dates[1] + ' 23:59:59',
USER_ID: this.$parent.USER_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
fnDetailsOfHiddenDangers(EVALUATIONSCOREEXCHANGE_ID) {
this.$parent.EVALUATIONSCOREEXCHANGE_ID = EVALUATIONSCOREEXCHANGE_ID
this.$parent.activeName = 'HiddenList'
this.$parent.HiddenListEntrance = 'RedemptionRecords'
},
goBack() {
this.$parent.activeName = 'PersonnelList'
}
}
}
</script>
<style lang="sass" scoped>
</style>

View File

@ -0,0 +1,40 @@
<template>
<div>
<List v-if="activeName == 'List'" />
<RedemptionRecords v-if="activeName == 'RedemptionRecords'"/>
<PersonnelList v-if="activeName == 'PersonnelList'" />
<KeyProjectHidden v-if="activeName == 'KeyProjectHidden'" active-name="HiddenList"/>
<HiddenList v-if="activeName == 'HiddenList'" />
</div>
</template>
<script>
import List from './components/list'
import PersonnelList from './components/personnel_list.vue'
import RedemptionRecords from './components/redemption_records.vue'
import HiddenList from './components/hidden_list.vue'
import KeyProjectHidden from '@/components/KeyProjectHidden/index'
export default {
components: {
List,
PersonnelList,
KeyProjectHidden,
RedemptionRecords,
HiddenList
},
data() {
return {
activeName: 'List',
CORPINFO_ID: '',
USER_ID: '',
EVALUATIONSCOREEXCHANGE_ID: '',
HIDDEN_ID: '',
HiddenListEntrance: ''
}
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,109 @@
<template>
<div class="app-container">
<el-table
v-loading="listLoading"
:data="varList"
:span-method="objectSpanMethod"
border
tooltip-effect="dark"
style="width: 100%">
<el-table-column prop="CORP_NAME" label="分公司名称" >
<template slot-scope="{row}">
<span class="link-type" @click="fnEvaluation(row)">{{ row.CORP_NAME }}</span>
</template>
</el-table-column>
<el-table-column prop="HIDDENTYPE2" label="隐患考评组类型"/>
<el-table-column prop="hiddenCount" label="发现隐患数"/>
<el-table-column prop="hiddenYanshouCount" label="已验收隐患数"/>
<el-table-column prop="hegeCount" label="已评审合格数"/>
<el-table-column prop="buhegeCount" label="已评审不合格数"/>
<el-table-column label="待评审数量">
<template slot-scope="{row}">
<span>{{ row.hiddenYanshouCount - (row.hegeCount+row.buhegeCount) }}</span>
</template>
</el-table-column>
<el-table-column prop="yiduihuan" label="已兑换积分"/>
<el-table-column prop="weiduihuan" label="未兑换积分"/>
</el-table>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
components: { Pagination, Treeselect },
directives: { waves },
data() {
return {
total: 0,
varList: [],
KEYWORDS: '',
listQuery: {
page: 1,
limit: 20
},
listLoading: false, //
searchForm: {
KEYWORDS: '',
TYPE: '',
USER_NAME: ''
}
}
},
created() {
this.getList()
},
methods: {
goKeyReset() {
this.searchForm.KEYWORDS = ''
this.searchForm.TYPE = ''
this.searchForm.USER_NAME = ''
this.getList()
},
//
getList() {
this.listLoading = true
requestFN(
'/keyProject/evaluationTongji/corpInfoTongjiList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
...this.searchForm
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (rowIndex % 2 === 0) {
return {
rowspan: 2,
colspan: 1
}
} else {
return {
rowspan: 0,
colspan: 0
}
}
}
},
fnEvaluation(row) {
this.$parent.CORPINFO_ID = row.CORPINFO_ID
this.$parent.activeName = 'PersonnelList'
}
}
}
</script>
<style lang="sass" scoped>
</style>

View File

@ -0,0 +1,36 @@
<template>
<div>
<List v-if="activeName =='List'" />
<PersonnelList v-if="activeName =='PersonnelList'" />
<RedemptionRecords v-if="activeName =='RedemptionRecords'" />
<HiddenList v-if="activeName =='HiddenList'" />
<KeyProjectHidden v-if="activeName =='KeyProjectHidden'" active-name="HiddenList"/>
</div>
</template>
<script>
import List from './components/list'
import PersonnelList from '../personnel_evaluation_status/components/personnel_list.vue'
import RedemptionRecords from '../personnel_evaluation_status/components/redemption_records.vue'
import HiddenList from '../personnel_evaluation_status/components/hidden_list.vue'
import KeyProjectHidden from '@/components/KeyProjectHidden/index'
export default {
components: {
List, PersonnelList, RedemptionRecords, HiddenList, KeyProjectHidden
},
data() {
return {
activeName: 'List',
CORPINFO_ID: '',
USER_ID: '',
EVALUATIONSCOREEXCHANGE_ID: '',
HIDDEN_ID: '',
HiddenListEntrance: ''
}
}
}
</script>
<style scoped>
</style>

View File

@ -2,20 +2,21 @@
<div> <div>
<OutSourced v-show="activeName=='OutSourced'" ref="outSourced" :other-show="true" active-name="List"/> <OutSourced v-show="activeName=='OutSourced'" ref="outSourced" :other-show="true" active-name="List"/>
<List v-if="activeName=='List'" /> <List v-if="activeName=='List'" />
<Info v-if="activeName=='Info'"/> <KeyProjectHidden v-if="activeName=='Info'"/>
</div> </div>
</template> </template>
<script> <script>
import List from './components/list' import List from './components/list'
import Info from './components/info' // import Info from './components/info'
import OutSourced from '@/components/OutSourced/index' import OutSourced from '@/components/OutSourced/index'
import KeyProjectHidden from '@/components/KeyProjectHidden/index'
export default { export default {
components: { components: {
List: List, List: List,
OutSourced: OutSourced, OutSourced: OutSourced,
Info: Info KeyProjectHidden: KeyProjectHidden
}, },
data() { data() {
return { return {