This commit is contained in:
宋伟佳
2021-11-29 21:30:27 +08:00
parent 3a6455839f
commit 18d2a6bb80
3 changed files with 116 additions and 144 deletions
+63 -80
View File
@@ -1,10 +1,13 @@
<!--符合性详情--> <!--符合性详情-->
<template> <template>
<div id="complianceDetails"> <div id="complianceDetails">
<!-- v-if="unfit.length"不满足--> <!-- 不满足-->
<el-divider content-position="left" >不满足</el-divider> <el-divider content-position="left" v-if="unfit.length" >不满足</el-divider>
<div class="content">
<el-table <el-table
height="100%"
ref="selection" ref="selection"
v-if="unfit.length"
:data="unfit" :data="unfit"
tooltip-effect="dark" tooltip-effect="dark"
border border
@@ -13,60 +16,53 @@
fontWeight: 'bold', height: '48px'}"> fontWeight: 'bold', height: '48px'}">
<el-table-column <el-table-column
prop="standNumber" prop="standNumber"
label="标准号" label="标准号/条款号"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="itemsNumber" prop="noCompliance"
label="条款号"
align="center"
>
</el-table-column>
<el-table-column
prop=""
label="评估人"
align="center"
>
</el-table-column>
<el-table-column
prop=""
label="评估时间"
align="center"
>
</el-table-column>
<el-table-column
prop=""
label="不合规项目" label="不合规项目"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="" prop="countermeasures "
label="应对措施" label="应对措施"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="" prop="completionTime "
label="完成时间" label="完成时间"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<!-- <el-table-column--> <el-table-column
<!-- prop="prcNum"--> prop="assessor"
<!-- label="流程"--> label="评估人"
<!-- align="center"--> align="center"
<!-- width="170px"--> >
<!-- >--> </el-table-column>
<!-- <template slot-scope="scope">--> <el-table-column
<!-- <span class="table-jump" @click="processCenterClick(scope.row)">{{ scope.row.prcNum }}</span>--> prop="evaluationTime"
<!-- </template>--> label="评估时间"
<!-- </el-table-column>--> align="center"
>
<template slot-scope="scope">
<span>{{ scope.row.evaluationTime ? $moment(scope.row.evaluationTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column>
</el-table> </el-table>
<pagination :page="page" :total="total" @pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
</div>
<!--满足--> <!--满足-->
<el-divider content-position="left" v-if="fit.length">满足</el-divider> <el-divider content-position="left" v-if="fit.length">满足</el-divider>
<div class="content">
<el-table <el-table
height="100%"
ref="selection" ref="selection"
v-if="fit.length" v-if="fit.length"
:data="fit" :data="fit"
@@ -77,45 +73,35 @@
fontWeight: 'bold', height: '48px'}"> fontWeight: 'bold', height: '48px'}">
<el-table-column <el-table-column
prop="standNumber" prop="standNumber"
label="标准号" label="标准号/条款号"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="itemsNumber" prop="complianceReasons"
label="条款号" label="合规"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="" prop="assessor"
label="评估人" label="评估人"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="" prop="evaluationTime"
label="评估时间" label="评估时间"
align="center" align="center"
> >
<template slot-scope="scope">
<span>{{ scope.row.evaluationTime ? $moment(scope.row.evaluationTime).format('YYYY-MM-DD') : '' }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column
prop=""
label="合规"
align="center"
>
</el-table-column>
<!-- <el-table-column-->
<!-- prop="prcNum"-->
<!-- label="流程"-->
<!-- align="center"-->
<!-- width="170px"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span class="table-jump" @click="processCenterClick(scope.row)">{{ scope.row.prcNum }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table> </el-table>
</div>
<!-- <pagination :page="page" :total="total" @pageChange="pageChange"-->
<!-- @pageSizeChange="pageSizeChange"></pagination>-->
<loading :loading="loading">加载中...</loading> <loading :loading="loading">加载中...</loading>
</div> </div>
</template> </template>
@@ -126,45 +112,35 @@ export default {
return { return {
loading: false, loading: false,
fit: [], // 满足 fit: [], // 满足
unfit: [] // 不满足 unfit: [], // 不满足
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
} }
}, },
methods: { methods: {
pageSizeChange(pageSize){
this.pageSize = pageSize
},
pageChange(page){
this.page = page
},
// 查询数据 // 查询数据
getAllList () { getAllList () {
let fromPage = this.$route.query.fromPage this.$http.get('sarStandardComplianceAssessResult/productNewDetail', {
console.log(fromPage); productId: this.$route.query.productId,
if (fromPage === 'product') { standId: this.$route.query.standId,
this.$http.get('lawss/sarProductStand/getAllList', {
standId: this.$route.query.sarId,
productId: this.$route.query.productId
}, { }, {
_this: this, _this: this,
loading: 'loading' loading: 'loading'
}, res => { }, res => {
if (res.ok) { if (res.ok) {
this.fit = res.data.fit this.fit = res.data.fit.records
this.unfit = res.data.unfit this.unfit = res.data.unfit.records
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
}) })
} else {
this.$http.get('lawss/sarCompStatusInfo/getAllList', {
sarId: this.$route.query.sarId,
sarState: this.$route.query.sarState
}, {
_this: this,
loading: 'loading'
}, res => {
if (res.ok) {
this.fit = res.data.fit
this.unfit = res.data.unfit
} else {
this.$message.warning(res.message)
}
})
}
}, },
/** /**
* @Description: 跳转流程 * @Description: 跳转流程
@@ -190,5 +166,12 @@ export default {
//width: 1200px; //width: 1200px;
//margin: 0 auto; //margin: 0 auto;
height: 100%; height: 100%;
.content{
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(~'50% - 30px');
overflow: auto;
}
} }
</style> </style>
@@ -161,9 +161,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button @click="changeState(scope.row)">符合性状态</el-button>--> <!-- <el-button @click="changeState(scope.row)">符合性状态</el-button>-->
<div class="table-jump" @click="changeState(scope.row)"> <div class="table-jump" @click="changeState(scope.row)">
<div v-if="scope.row.sarState === 1">符合</div> <div v-if="scope.row.sarState === 0">符合</div>
<div v-if="scope.row.sarState === 2">不符合</div> <div v-else >不符合</div>
<div v-if="scope.row.sarState === 3"></div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@@ -519,14 +518,11 @@ export default {
}, },
methods: { methods: {
changeState (row) { changeState (row) {
console.log(row);
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
name: 'ComplianceDetails', name: 'ComplianceDetails',
query: { query: {
sarId: this.saveSarId, productId: this.localProEO.projectNumber,
productId: row.productId, standId: row.standId,
sarType: row.standType,
fromPage: 'product'
} }
}) })
window.open(routeUrl.href, '_blank') window.open(routeUrl.href, '_blank')
@@ -858,7 +854,7 @@ export default {
this.localProEO = JSON.parse(JSON.stringify(item)) this.localProEO = JSON.parse(JSON.stringify(item))
this.proId = this.localProEO.id this.proId = this.localProEO.id
// 查询详情表格数据 // 查询详情表格数据
this.$http.get('sarStandProjectLibrary/queryStandInfo', { this.$http.get('sarStandProjectLibrary/queryStandInfoNew', {
id: this.localProEO.id, id: this.localProEO.id,
cars: "1" cars: "1"
}, { }, {
@@ -173,7 +173,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="productLineId" prop="productLine"
label="产品线"> label="产品线">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -190,9 +190,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button @click="changeState(scope.row)">符合性状态</el-button>--> <!-- <el-button @click="changeState(scope.row)">符合性状态</el-button>-->
<div class="table-jump" @click="changeState(scope.row)"> <div class="table-jump" @click="changeState(scope.row)">
<div v-if="scope.row.sarState === 1">符合</div> <div v-if="scope.row.sarState === 0">符合</div>
<div v-if="scope.row.sarState === 2">不符合</div> <div v-else >不符合</div>
<div v-if="scope.row.sarState === 3"></div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@@ -243,14 +242,11 @@ export default {
}, },
methods: { methods: {
changeState (row) { changeState (row) {
console.log(row);
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
name: 'ComplianceDetails', name: 'ComplianceDetails',
query: { query: {
sarId: this.saveSarId,
productId: row.productId, productId: row.productId,
sarType: row.standType, standId: row.standId,
fromPage: 'product'
} }
}) })
window.open(routeUrl.href, '_blank') window.open(routeUrl.href, '_blank')
@@ -299,23 +295,20 @@ export default {
this.queryStandAndLaws(); this.queryStandAndLaws();
}, // 外层清空条件查询 }, // 外层清空条件查询
handleProjectCompliance(row) { handleProjectCompliance(row) {
this.sarProStateEO.type = row.type this.sarProStateEO.standId = row.standId
this.productId = row.productId; this.productId = row.productId;
this.querySarProStateZero(); this.querySarProStateZero();
}, // 查看项目符合性 }, // 查看项目符合性
querySarProStateZero(page) { querySarProStateZero(page) {
console.log(page)
if (page) { if (page) {
this.sarProStateTotalPage = page this.sarProStateTotalPage = page
} else { } else {
this.sarProStateTotalPage = 1; this.sarProStateTotalPage = 1;
} }
var form = this.sarProStateEO; var form = this.sarProStateEO;
console.log('395',form)
// form.standId = this.standId
form.current = this.sarProStateTotalPage; form.current = this.sarProStateTotalPage;
form.size = this.sarProStatePageSize; form.size = this.sarProStatePageSize;
this.$http.get("sarStandardComplianceAssessResult/product", form, { this.$http.get("sarStandardComplianceAssessResult/productNew", form, {
_this: this _this: this
}, res => { }, res => {
if (res.ok) { if (res.ok) {