code init

This commit is contained in:
chenxiaoxi
2021-05-25 18:06:45 +08:00
parent 02698d6dab
commit f54a8d4fa1
1367 changed files with 540755 additions and 21713 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,761 @@
<!-- 标准法规库 - 未符合项跟踪 - 历史数据-->
<template>
<div class="historical-data v-class">
<div class="laws-details-header">
<div class="back" title="返回" @click="back">
<i class="el-icon-back"></i>
</div>
<div class="title">历史数据</div>
</div>
<div class="search-area">
<div class="left">
<el-form :modal="historySearch" :inline="true" class="label-input-form" >
<el-form-item label="标准号/标准名称" class="search-item">
<el-input v-model="historySearch.standNumOrName"
placeholder="请输入"
clearable
@keyup.enter="getTableBtn"
:maxlength="100"></el-input>
</el-form-item>
<el-form-item label="问题类型" class="search-item">
<el-select v-model="historySearch.quesType">
<el-option value="1" label="不满足"></el-option>
<el-option value="2" label="待验证"></el-option>
</el-select>
</el-form-item>
<el-form-item label="相关项目" class="search-item">
<el-select v-model="historySearch.productName">
<el-option v-for="item1 in productNameList"
:key="item1.value"
:label="item1.label"
:value="item1.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="责任部门" class="search-item">
<el-input v-model="historySearch.responseUnit" v-show="false" />
<el-popover
placement="bottom"
popper-class="user-dept-popper"
trigger="click"
:value="false"
>
<el-input
slot="reference"
v-model="historySearch.responseUnitShow"
placeholder="根据责任部门查找"
readonly
clearable
id="searchResp"
/>
<div class="api">
<laws-tree
:zNodes="zNodesSItem"
treeDivId="zNodesSItemSearch"
deptSelect
showRMenu
@treeDblClick="(treeId, treeNode) => treeClickSearch(treeId, treeNode)"
class="ztree" style="width: 200px;height: 400px;overflow: auto">
</laws-tree>
</div>
</el-popover>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
icon="el-icon-search"
type="primary"
class="common-button-primary"
round
@click="getTableBtn">
</el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
icon="el-icon-refresh-left"
round
@click="clearAllSearch"></el-button>
</el-form-item>
</el-form>
</div>
</div>
<div class="content">
<loading :loading="loading">数据获取中</loading>
<el-table
:data="historyList"
tooltip-effect="dark"
style="width: 100%;"
height="100%"
border
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="handleRowChange"
ref="selection"
>
<el-table-column
type="selection"
width="55"
fixed="left"
align="center">
</el-table-column>
<el-table-column
prop="standNum"
fixed="left"
width="180px"
label="标准号/政策号">
<template slot-scope="scope">
<a @click="detailsStandard(scope.row)" class="table-jump">{{ scope.row.standNum }}</a>
</template>
</el-table-column>
<el-table-column
prop="standName"
fixed="left"
width="180px"
label="标准名称/政策名称">
<template slot-scope="scope">
<a @click="detailsStandard(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- prop="requestType"-->
<!-- label="要求类型">-->
<!-- </el-table-column>-->
<el-table-column
prop="quesType"
label="问题类型">
<template slot-scope="scope">
<div v-if="scope.row.quesType === '1'">不满足</div>
<div v-if="scope.row.quesType === '2'">待验证</div>
<div v-if="scope.row.quesType === '1,2' || scope.row.quesType === '2,1'">不满足,待验证</div>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- prop="sarState"-->
<!-- align="center"-->
<!-- label="合规性分级">-->
<!-- <template slot-scope="scope">-->
<!-- <div v-if="!scope.row.quesType">-->
<!-- <img class="iconClass" src="../../../../assets/images/ComplianceClassification/white.png">-->
<!-- </div>-->
<!-- <div v-else-if="scope.row.color === '#f00'">-->
<!-- <img class="iconClass" @click="typeColor(scope.row, 1)" src="../../../../assets/images/ComplianceClassification/red.png" >-->
<!-- </div>-->
<!-- <div v-else-if="scope.row.color === '#ff0'">-->
<!-- <img class="iconClass" @click="typeColor(scope.row, 1)" src="../../../../assets/images/ComplianceClassification/yellow.png" >-->
<!-- </div>-->
<!-- <div v-else>-->
<!-- <img class="iconClass" src="../../../../assets/images/ComplianceClassification/green.png" >-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
prop="productNameShow"
label="相关项目">
</el-table-column>
<el-table-column
prop="responseUnitShow"
label="责任部门">
</el-table-column>
<el-table-column
prop="responseEnginShow"
width="150px"
label="责任工程师">
</el-table-column>
<el-table-column
prop="realCloseTime"
width="150px"
sortable
label="实际关闭时间">
<template slot-scope="scope">{{(scope.row.realCloseTime ? scope.row.realCloseTime.substring(0, 11): '')}}</template>
</el-table-column>
<el-table-column
prop="closeType"
width="150px"
label="关闭类型">
<template slot-scope="scope">
<div v-if="scope.row.closeType === '1'">强制关闭</div>
<div v-if="scope.row.closeType === '2'">流程关闭</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="[scope.row, '查看']">查看</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
</div>
<pagination :page="pageNo" :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
<el-drawer
title='查看'
:visible.sync="historySee"
destroy-on-close
:wrapperClosable="false"
class="seeHisToryDraw"
size="1000px"
>
<div class="demo-drawer-content">
<div class="el-drawer-form" style="height: auto">
<el-form
class="label-input-form"
label-width="150px"
ref="nonAddForm"
style="width: 100%;"
:model="historySeeForm"
>
<el-form-item class="add-form-item" label="标准号/政策号:">
<div class="seeItem">{{historySeeForm.standNum}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="标准名称/政策名称:">
<div class="seeItem">{{historySeeForm.standName}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="问题类型:">
<div class="seeItem">{{historySeeForm.quesType}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="相关项目:">
<div class="seeItem">{{historySeeForm.productNameShow}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="不符合项数目:">
<div class="seeItem">{{historySeeForm.inconNum}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="实际关闭时间:">
<div class="seeItem">{{(historySeeForm.realCloseTime ? historySeeForm.realCloseTime.substring(0, 11): '')}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="相关流程:">
<div class="seeItem table-jump" @click="processCenterClick(historySeeForm.relateAct)">{{historySeeForm.relateAct}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="责任部门:">
<div class="seeItem">{{historySeeForm.responseUnitShow}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="责任工程师:">
<div class="seeItem">{{historySeeForm.responseEnginShow}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="关闭理由:">
<div class="seeItem">{{historySeeForm.closeReason}}</div>
</el-form-item>
<el-form-item class="add-form-item" label="关闭类型:">
<div v-if="historySeeForm.closeType">
<div class="seeItem" v-if="historySeeForm.closeType === '1'">强制关闭</div>
<div class="seeItem" v-if="historySeeForm.closeType === '2'">流程关闭</div>
</div>
<div class="seeItem" v-else>{{historySeeForm.closeType}}</div>
</el-form-item>
</el-form>
</div>
<div class="typebox" v-if="historySeeForm.inconItemEOList != null && historySeeForm.inconItemEOList.length > 0">
<el-divider content-position="left">不符合项</el-divider>
<div class="typeitem" v-for="(item, index) in historySeeForm.inconItemEOList" :key="index">
<div class="typeitems">
<div class="itemsLeft">条款号:</div>
<div class="itemsRight">{{item.itemNum}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">涉及项目:</div>
<div class="itemsRight">{{item.productNameShow}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">目前状态:</div>
<!-- <div class="itemsRight" v-if="item.itemState == '2'">符合</div>-->
<div class="itemsRight">不符合</div>
</div>
<div class="typeitems">
<div class="itemsLeft">设计完成时间:</div>
<div class="itemsRight">{{(item.stepFirTime ? item.stepFirTime.substring(0, 10): '')}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">佐证材料:</div>
<!-- <div class="itemsRight">{{item.supportFile}}</div>-->
<div class="itemsRight">
<p
class="files-title"
v-for="(file, fileIndex) in item.supportFileList"
:key="fileIndex"
>
<span>{{ file.oldFileName }}</span>
<i title="下载" @click="downloadFile(file.id)" class="icon-download" />
</p>
</div>
</div>
<div class="typeitems">
<div class="itemsLeft">备注信息:</div>
<div class="itemsRight">{{item.remark}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">验证完成时间:</div>
<div class="itemsRight">{{(item.stepSecTime ? item.stepSecTime.substring(0, 10): '')}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">佐证材料:</div>
<div class="itemsRight">
<p
class="files-title"
v-for="(file, fileIndex) in item.secSupportFileList"
:key="fileIndex"
>
<span>{{ file.oldFileName }}</span>
<i title="下载" @click="downloadFile(file.id)" class="icon-download" />
</p>
</div>
</div>
<div class="typeitems">
<div class="itemsLeft">备注信息:</div>
<div class="itemsRight">{{item.secRemark}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">整改完成时间:</div>
<div class="itemsRight">{{(item.stepThiTime ? item.stepThiTime.substring(0, 10): '')}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">佐证材料:</div>
<div class="itemsRight">
<p
class="files-title"
v-for="(file, fileIndex) in item.thrSupportFileList"
:key="fileIndex"
>
<span>{{ file.oldFileName }}</span>
<i title="下载" @click="downloadFile(file.id)" class="icon-download" />
</p>
</div>
</div>
<div class="typeitems">
<div class="itemsLeft">备注信息:</div>
<div class="itemsRight">{{item.thrRemark}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">责任部门:</div>
<div class="itemsRight">{{item.responseUnitShow}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">责任工程师:</div>
<div class="itemsRight">{{item.responseEnginShow}}</div>
</div>
</div>
</div>
<div class="typebox" v-if="historySeeForm.besureItemEOList != null && historySeeForm.besureItemEOList.length > 0">
<el-divider content-position="left">待验证项</el-divider>
<div class="typeitem" v-for="(item, index) in historySeeForm.besureItemEOList" :key="index">
<div class="typeitems">
<div class="itemsLeft">条款号:</div>
<div class="itemsRight">{{item.itemNum}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">涉及项目:</div>
<div class="itemsRight">{{item.productNameShow}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">责任部门:</div>
<div class="itemsRight">{{item.responseUnitShow}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">责任工程师:</div>
<div class="itemsRight">{{item.responseEnginShow}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">验证时间:</div>
<div class="itemsRight">{{(item.validTime ? item.validTime.substring(0, 11): '')}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">验证结果:</div>
<div class="itemsRight">待验证</div>
</div>
</div>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
export default {
name: 'HistoricalData',
components: {},
data () {
return {
loading: false,
// 搜索条件字段
historySearch: {
standNumOrName: '',
quesType: '',
productName: '',
responseUnitShow: '',
responseUnit: ''
},
zNodesSItem: [],
// table列表数据
historyList: [],
// 总数
total: 0,
// 当前页数
pageNo: 1,
// 单页数量
pageSize: this.$store.getters.userInfo.configContent,
// 历史数据查看
historySee: false,
historySeeForm: {},
productNameList: [],
optionList: [
{
label: '不满足',
value: '1'
},
{
label: '待验证',
value: '2'
}
]
}
},
methods: {
openFileInPdf (attId, oldFileName) {
// 缺少文件
if (this.$hasPermission('ZWBGBNTL11')) {
this.$http.get('lawss/sarStandFile/queryConvertAtt', {
attId: attId
}, {
_this: this
}, res => {
if (res.data) {
let fileObj = {}
fileObj.fileId = res.data.attId
fileObj.fileName = oldFileName
let fileList = []
let repeatData = 0
if (sessionStorage.getItem('fileInfo')) {
fileList = JSON.parse(sessionStorage.getItem('fileInfo'))
if (fileList != null && fileList.length > 0) {
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].fileId === res.data.attId) {
repeatData = 1
break
}
}
if (repeatData === 0) {
fileList.push(fileObj)
fileList = JSON.stringify(fileList)
sessionStorage.setItem('fileInfo', fileList)
}
}
} else {
fileList.push(fileObj)
fileList = JSON.stringify(fileList)
sessionStorage.setItem('fileInfo', fileList)
}
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + res.data.attId))
} else {
this.$message.error('文档未转换成功或本地读取不到该文档')
}
}, e => {
this.$message.error('文档未转换成功或本地读取不到该文档')
})
} else {
this.$message.error('没有在线预览文档权限!')
}
},
downloadFile (attId) {
if (attId != null && attId !== '') {
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
} else {
this.$message.error('请选择要下载的文件')
}
},
downloadFileByWater (attId, fileSuffix) {
if (fileSuffix !== 'pdf' && fileSuffix !== 'PDF') {
this.$message.error('水印下载仅支持PDF,pdf格式文件')
} else {
if (attId != null && attId !== '') {
window.location.href = '/api/att/attFile/downloadFileForSarWaterMark?fileId=' + attId
} else {
this.$message.error('请选择要下载的文件')
}
}
},
typeColor (row, type) {
this.$confirm('确定修改此标准分级?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
var color = ''
if (type === 1) {
if (row.color === '#f00') {
color = '#ff0'
} else {
color = '#f00'
}
} else {
color = '#f00'
}
this.$http.postData('lawss/sarInconformInfo/updateInconformInfo',
{
id: row.id,
color: color
}, {
_this: this
}, res => {
if (res.ok) {
this.getTableBtn()
} else {
this.$message({
type: 'error',
message: '修改失败!'
})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消修改'
})
})
},
detailsStandard (item) {
this.$http.post('lawss/sarTestItem/validateStandNumber', {
standnumber: item.standNum
}, {
_this: this
}, res => {
this.pageType = res.data.standType
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: res.data.standid,
pageType: this.pageType
}
})
window.open(routeUrl.href, '_blank')
}, e => {
})
},
getOrgTreeSource () {
this.$http.get('sys/org/getTree', {}, {_this: this},
res => {
if (res.ok) {
let treeNode = []
res.data.map((item, index) => {
let treeItem = {}
for (let key in item) {
if (key === 'orgName') {
treeItem.name = item[key]
} else {
treeItem[key] = item[key]
}
}
treeNode[index] = treeItem
})
this.zNodesSItem = treeNode
// this.searchInlandNodes = treeNode
}
}, e => {})
},
// 更多
handleCommand (command) {
switch (command[1]) {
case '查看':
this.showUser(command[0])
break
}
},
// 查看方法
showUser (row) {
this.historySeeForm = JSON.parse(JSON.stringify(row))
this.historySee = true
this.$nextTick(() => {
const arr = []
let questionType = []
questionType = this.historySeeForm.quesType.split(',')
questionType.map((item) => {
this.optionList.map((opr) => {
if (item === opr.value) {
item = opr.label
arr.push(item)
}
})
})
this.historySeeForm.quesType = arr.toString()
})
},
// 分页事件
pageChange (page) {
this.pageNo = page
this.getTableBtn()
},
pageSizeChange (pageSize) {
this.pageSize = this.$store.getters.userInfo.configContent
this.getTableBtn()
},
back () {
this.$router.push({
name: 'NonConfomity'
})
},
// 未符合项table selected事件
handleRowChange (selection) {
//
},
// 点击搜索按钮事件
getTableBtn () {
this.$http.get('lawss/sarInconformInfo/getHistoryDatas', {
page: this.pageNo,
pageSize: this.pageSize,
standNumOrName: this.historySearch.standNumOrName,
quesType: this.historySearch.quesType,
productName: this.historySearch.productName,
responseUnit: this.historySearch.responseUnit
}, {
_this: this,
loading: 'loading'
}, res => {
if (res.ok) {
this.historyList = res.data.list
this.total = res.data.count
} else {}
}, e => {
})
},
getSearchInforList () {
this.$http.get('lawss/sarProductInfo/getSelList', {}, {
_this: this, loading: 'loading'
}, res => {
// const arr2 = []
// for (let key in res.data.projectValue) {
// const obj = {}
// obj.label = key
// obj.value = res.data.projectValue[key]
// arr2.push(obj)
// }
this.productNameList = res.data.projectValue
})
},
treeClickSearch (treeId, treeNode) {
this.historySearch.responseUnit = treeNode.id
this.historySearch.responseUnitShow = treeNode.name
},
// 点击清空按钮事件
clearAllSearch () {
this.historySearch = {
standNumOrName: '',
quesType: '',
productName: '',
responseUnit: ''
}
this.getTableBtn()
},
/**
* @Description: 跳转流程
*/
processCenterClick (item) {
let routeUrl = this.$router.resolve({
name: 'ProcessDetail',
query: {
prcNum: item
}
})
window.open(routeUrl.href, '_blank')
}
},
mounted () {
this.getTableBtn()
this.getOrgTreeSource()
this.getSearchInforList()
}
}
</script>
<style lang="less" scoped>
.historical-data{
height: 100%;
.laws-details-header {
background: #fff;
// height: 30px;
line-height: 50px;
padding: 0 10px;
//margin-bottom: 5px;
.back {
display: inline-block;
margin-right: 10px;
}
.title {
display: inline-block;
font-weight: bold;
font-size: 18px;
flex: 1;
padding: 0 15px;
text-align: center;
}
}
.content{
height: calc(~'100% - 56px - 107px');
.iconClass{
width: 18px;
height: 18px;
}
}
.typebox {
.typeitem {
border: 1px solid #f4f4f4;
border-radius: 5px;
padding: 10px 10px 0;
margin: 10px 0;
display: flex;
flex-wrap: wrap;
.typeitems {
margin-bottom: 10px;
display: flex;
line-height: 30px;
width: 100%;
.itemsLeft {
min-width: 140px;
margin-right: 10px;
text-align: right;
}
.itemsRight {
/*width: 150px;*/
flex-wrap: wrap;
display: flex;
.files-title{
margin-right: 10px;
}
a{
cursor: pointer;
color: #409EFF;
}
a:hover{
text-decoration: underline;
color: #409EFF;
}
i{
display: inline-block;
margin-left: 3px;
width: 18px;
height: 16px;
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center center;
vertical-align: sub;
cursor: pointer;
}
.icon-download{
background-image: url("~assets/images/shangqi/img/download.png");
}
.icon-download2{
background-image: url("~assets/images/shangqi/img/download2.png");
}
}
}
}
}
.seeHisToryDraw{
/deep/.el-form-item__content{
line-height: 50px;
}
}
}
.add-form-item{
width: 100%;
}
</style>