| | |
| | | <el-input v-model="dataForm.confidence" placeholder="置信度" clearable></el-input> |
| | | </zt-form-item> |
| | | <el-button type="primary" @click="assess()">评定</el-button> |
| | | <el-button type="primary" @click="add()">新增评定数据</el-button> |
| | | <el-button type="primary" @click="assessData()">评定数据管理</el-button> |
| | | <el-button type="primary" @click="handleExpand()">{{expandText}}</el-button> |
| | | <el-dropdown style="margin-left: 10px" @command="download"> |
| | | <el-button type="primary"> |
| | | 下载xml<i class="el-icon-arrow-down el-icon--right"></i> |
| | | </el-button> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item command="1">输入xml</el-dropdown-item> |
| | | <el-dropdown-item command="2">输出xml</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </el-form> |
| | | <el-table ref="multipleTable" v-loading="table.dataLoading" :data="dataList" height="100px" v-adaptive="{bottomOffset:70}" |
| | | row-key="id" |
| | |
| | | <el-table-column prop="assessResult" label="评定结果" align="right"> |
| | | </el-table-column> |
| | | </el-table> |
| | | <add-or-update @refreshDataList="refreshData" ref="AddOrUpdate"/> |
| | | <assess-manage @refreshDataList="refreshData" ref="AssessManage"/> |
| | | </zt-table-wraper> |
| | | <el-dialog v-dialogDrag :close-on-click-modal="false" top="8vh" :visible.sync="dialogVisible" title="模型检查" |
| | | width="60%" @close="dialogVisible = false"> |
| | | <el-tag type="danger" style="margin-bottom: 10px">模型定义/参数配置/评定数据里存在以下问题:</el-tag> |
| | | <el-table :data="modelCheckResult" height="350" |
| | | :header-cell-style="{'text-align':'center'}"> |
| | | <el-table-column prop="category" label="检查结果" align="center" width="150"/> |
| | | <el-table-column prop="taskName" label="任务名称" align="center"/> |
| | | <el-table-column prop="taskPhaseName" label="任务阶段名称" align="center"/> |
| | | <el-table-column prop="gkName" label="工况名称" align="center"/> |
| | | <el-table-column prop="nodeName" label="节点名称" align="center"/> |
| | | <el-table-column prop="modelName" label="模型名称" align="center"/> |
| | | <el-table-column prop="deviceName" label="设备名称" align="center"/> |
| | | <el-table-column prop="paramName" label="参数名称" align="center"/> |
| | | </el-table> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="dialogVisible = false">关 闭</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import AddOrUpdate from './RelisbilityAssess-AddOrUpdate' |
| | | import qs from "qs"; |
| | | import Cookies from "js-cookie"; |
| | | import AssessManage from "./RelisbilityAssess-Manage"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | flag2: false, |
| | | defultKey: [], |
| | | isExpand:false, |
| | | expandText:"一键展开" |
| | | expandText:"一键展开", |
| | | dialogVisible: false, |
| | | modelCheckResult: [], |
| | | } |
| | | }, |
| | | components: { |
| | | AddOrUpdate |
| | | AssessManage, |
| | | }, |
| | | mounted() { |
| | | this.getProductList() |
| | |
| | | } |
| | | }) |
| | | }, |
| | | refreshData(){ |
| | | this.getAssessDataList() |
| | | }, |
| | | async zhixin() { |
| | | await this.getTaskList() |
| | | await this.getAssessDataList() |
| | |
| | | onTaskSelected(data) { |
| | | console.log(data, ' onProductSelected(data)') |
| | | this.dataForm.taskId = data.id |
| | | if (this.dataForm.taskId&& this.dataForm.itemId) { |
| | | this.page() |
| | | } |
| | | }, |
| | | onAssessDataSelected(data) { |
| | | this.dataForm.itemId = data.id |
| | | this.page() |
| | | }, |
| | | refreshData() { |
| | | this.getAssessDataList(); |
| | | if (this.dataForm.taskId&& this.dataForm.itemId) { |
| | | this.page() |
| | | } |
| | | }, |
| | | async getAssessDataList() { |
| | | let params = { |
| | |
| | | } |
| | | this.flag2 = true |
| | | }, |
| | | add() { |
| | | this.$refs.AddOrUpdate.$refs.dialog.init(null, { |
| | | assessData(){ |
| | | this.$refs.AssessManage.$refs.dialog.init(null, { |
| | | productId: this.dataForm.productId, |
| | | shipName: this.dataForm.shipName |
| | | }) |
| | | }) |
| | | }, |
| | | async assess() { |
| | | this.dialogVisible = false |
| | | this.modelCheckResult = [] |
| | | if (!this.dataForm.productId || !this.dataForm.taskId || !this.dataForm.itemId || !this.dataForm.confidence) { |
| | | this.$tip.alert("有未填写的数据") |
| | | return |
| | | } |
| | | let res = await this.$http.post('/taskReliability/ReliabilityAssess/assess', this.dataForm) |
| | | console.log(res.data) |
| | | this.dataList = res.data |
| | | let res = await this.$http.post('/taskReliability/ReliabilityAssess/assessCheck', this.dataForm) |
| | | if (res.success) { |
| | | if (res.data && res.data.length > 0) { |
| | | this.modelCheckResult = res.data |
| | | this.dialogVisible = true |
| | | } else { |
| | | let res = await this.$http.post('/taskReliability/ReliabilityAssess/assess', this.dataForm) |
| | | if (res.success) { |
| | | console.log(res.data) |
| | | this.dataList = res.data |
| | | this.$alert('评定成功', '提示', { |
| | | confirmButtonText: '确定' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | async getProductList() { |
| | | let res = await this.$http.get('/basicInfo/XhProductModel/getTaskProductList') |
| | |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | async download(selsect) { |
| | | if (!this.dataForm.productId || !this.dataForm.taskId || !this.dataForm.itemId ) { |
| | | this.$tip.alert("有未填写的数据") |
| | | return |
| | | } |
| | | let param = qs.stringify({ |
| | | 'token': Cookies.get('token'), |
| | | productId: this.dataForm.productId, |
| | | taskId: this.dataForm.taskId, |
| | | itemId: this.dataForm.itemId, |
| | | xml:selsect |
| | | }) |
| | | let apiURL = `/taskReliability/ReliabilityAssess/downloadXml` |
| | | window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${param}` |
| | | } |
| | | }, |
| | | } |
| | | </script> |