|
@@ -3,14 +3,13 @@
|
|
|
|
|
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
<el-breadcrumb-item>首页</el-breadcrumb-item>
|
|
|
- <el-breadcrumb-item>承担单位</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item :to="{ path: '/jc/routineMonitor' }">任务列表</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>基本信息</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
|
|
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
|
<el-tab-pane label="任务详情" name="first">
|
|
|
- <el-descriptions class="margin-top" :title="readForm.task_class+'任务'" :column="2" :size="size" border>
|
|
|
+ <el-descriptions class="margin-top" title="例行监测任务" :column="2" :size="size" border>
|
|
|
<el-descriptions-item>
|
|
|
<template slot="label">
|
|
|
发布单位
|
|
@@ -99,11 +98,11 @@
|
|
|
<div class="footer">
|
|
|
<el-button type="success" size="mini" @click="input()">填报抽样单</el-button>
|
|
|
<!-- <el-button type="success" size="mini" @click="next">导出总览</el-button> -->
|
|
|
- <el-button type="success" size="mini" @click="back()">返回</el-button>
|
|
|
+ <el-button type="success" size="mini">返回</el-button>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
- <el-tab-pane label="抽样" name="second">
|
|
|
+ <el-tab-pane v-if="sampleShow==true" label="抽样" name="second">
|
|
|
<!-- 头部搜索栏 -->
|
|
|
<el-row style="margin-right: 0px;">
|
|
|
<el-form style="display: flex; flex-direction: row;">
|
|
@@ -135,19 +134,19 @@
|
|
|
<el-form-item label="抽样机构" class="select" size="small">
|
|
|
<el-input v-model="queryInfo.task_name"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-button style="height: 32px;margin-left: 15px;" size="mini" type="success"
|
|
|
+ <el-button style="height: 30px;margin-left: 10px;" size="mini" type="success"
|
|
|
@click="searchData()">查询
|
|
|
</el-button>
|
|
|
<!-- 重置 -->
|
|
|
- <el-button style="height: 32px;margin-left: 5px;" size="mini" type="success" @click="reset()">
|
|
|
+ <el-button style="height: 30px;margin-left: 5px;" size="mini" type="success" @click="reset()">
|
|
|
重置
|
|
|
</el-button>
|
|
|
</el-form>
|
|
|
-
|
|
|
+
|
|
|
</el-row>
|
|
|
<el-row style="margin-right: 0px;">
|
|
|
<el-form style="display: flex; flex-direction: row;">
|
|
|
- <!-- <el-form-item label="产地" class="select">
|
|
|
+ <!-- <el-form-item label="产地" class="select">
|
|
|
<el-select v-model="value" placeholder="请选择省份" size="small">
|
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label"
|
|
|
:value="item.value">
|
|
@@ -165,7 +164,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item> -->
|
|
|
<!-- 查询 -->
|
|
|
-
|
|
|
+
|
|
|
</el-form>
|
|
|
<div style="display: flex;flex-direction: row;float: right;">
|
|
|
<el-button type="primary" size="small" plain icon="el-icon-plus" @click="input()">填报抽样单
|
|
@@ -184,7 +183,7 @@
|
|
|
@selection-change="handleSelectionChange" style="width: 100%" :row-style="rowStyle"
|
|
|
:cell-style="cellStyle">
|
|
|
<el-table-column type="selection" width="50"></el-table-column>
|
|
|
- <el-table-column label="序号" width="50px" align="center">
|
|
|
+ <el-table-column label="序号" width="50px">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.$index+1 }}
|
|
|
</template>
|
|
@@ -192,13 +191,12 @@
|
|
|
|
|
|
<el-table-column :key="table.label" v-for="table in tableHeader" :label="table.label"
|
|
|
:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
|
|
|
-
|
|
|
- <el-table-column label="操作" width="150px" align="center">
|
|
|
- <template>
|
|
|
- <el-button type="success" size="small" plain @click="sampleDetail(scope.row.sample_id)">查看</el-button>
|
|
|
+ <el-table-column label="操作" align="center" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="success" size="small" plain @click="sampleDetail(scope.row.sample_id)">查看
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
</el-table>
|
|
|
<!-- 分页器区域-->
|
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
@@ -206,13 +204,13 @@
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="total" background />
|
|
|
</el-tab-pane>
|
|
|
|
|
|
- <el-tab-pane label="检测" name="third">
|
|
|
+ <el-tab-pane v-if="checkShow==true" label="检测" name="third">
|
|
|
|
|
|
<!-- 表格数据区域-->
|
|
|
<el-table :data="tableData" border stripe highlight-current-row style="width: 100%"
|
|
|
:row-style="rowStyle" :cell-style="cellStyle">
|
|
|
<!-- <el-table-column type="selection" width="50"></el-table-column> -->
|
|
|
- <el-table-column label="序号" width="50px" align="center">
|
|
|
+ <el-table-column label="序号" width="50px">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.$index+1 }}
|
|
|
</template>
|
|
@@ -220,7 +218,7 @@
|
|
|
|
|
|
<el-table-column :key="table.label" v-for="table in checkHeader" :label="table.label"
|
|
|
:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
|
|
|
- <el-table-column label="操作" align="center" width="220px">
|
|
|
+ <el-table-column label="操作" align="center" fixed="right" width="220px">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="success" size="mini" v-if="scope.row.jc_value_id==null" plain
|
|
|
@click="check(scope.row.sample_id,scope.row.sample_name)">检测</el-button>
|
|
@@ -266,9 +264,9 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="抽检结果">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.test_value<=scope.row.state_value&&scope.row.state_value!='ND'"
|
|
|
+ <span v-if="parseFloat(scope.row.test_value)<=parseFloat(scope.row.state_value)&&scope.row.state_value!='ND'"
|
|
|
size="small">合格</span>
|
|
|
- <span v-else-if="scope.row.test_value>scope.row.state_value" size="small">不合格</span>
|
|
|
+ <span v-else-if="parseFloat(scope.row.test_value)>parseFloat(scope.row.state_value)" size="small">不合格</span>
|
|
|
<span v-else-if="scope.row.test_value=='ND'&&scope.row.state_value=='ND'"
|
|
|
size="small">合格</span>
|
|
|
<span v-else-if="scope.row.test_value!='ND'&&scope.row.state_value=='ND'"
|
|
@@ -420,7 +418,7 @@
|
|
|
</div>
|
|
|
<el-button @click="dialogVisible2 = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="download">生成检测报告pdf</el-button>
|
|
|
- <!-- </span> -->
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-tab-pane label="报告上传" name="five">
|
|
@@ -439,6 +437,7 @@
|
|
|
import htmlToPdf from '../../assets/js/htmlToPdf.js'
|
|
|
import inputCheck from './inputCheck'
|
|
|
const token = window.sessionStorage.getItem('token')
|
|
|
+ const name = window.sessionStorage.getItem('name')
|
|
|
export default {
|
|
|
name: 'setTask',
|
|
|
data() {
|
|
@@ -479,7 +478,7 @@
|
|
|
{
|
|
|
label: '受检单位',
|
|
|
prop: 'units_name',
|
|
|
- width: 150
|
|
|
+ width: 180
|
|
|
},
|
|
|
{
|
|
|
label: '样品产地',
|
|
@@ -492,7 +491,7 @@
|
|
|
}, {
|
|
|
label: '状态',
|
|
|
prop: 'status',
|
|
|
- width: 150
|
|
|
+ width: 180
|
|
|
}
|
|
|
],
|
|
|
checkHeader: [{
|
|
@@ -596,8 +595,10 @@
|
|
|
prop: 'uploadtime'
|
|
|
}
|
|
|
],
|
|
|
- fileList:[],
|
|
|
- total:0,
|
|
|
+ fileList: [],
|
|
|
+ total: 0,
|
|
|
+ sampleShow: false, //是否展示抽样卡片
|
|
|
+ checkShow: false //是否展示检测卡片
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -606,7 +607,8 @@
|
|
|
mounted() {},
|
|
|
created() {
|
|
|
this.task_id = this.$route.params.id
|
|
|
- // console.log(this.$route.params)
|
|
|
+
|
|
|
+
|
|
|
this.getTaskDetail()
|
|
|
this.getSampleList()
|
|
|
// this.getmodelList()
|
|
@@ -621,6 +623,15 @@
|
|
|
// 判断业务逻辑
|
|
|
if (result.data.code == 0) {
|
|
|
this.underTask = result.data.data.rows
|
|
|
+ // 抽检分离时判断用户是抽样机构还是检测机构
|
|
|
+ for (let i = 0; i < this.underTask.length; i++) {
|
|
|
+ if (this.underTask[i].bear_name == name) {
|
|
|
+ this.sampleShow = true
|
|
|
+ }
|
|
|
+ if (this.underTask[i].check_name == name) {
|
|
|
+ this.checkShow = true
|
|
|
+ }
|
|
|
+ }
|
|
|
this.underTasktotal = result.data.data.total
|
|
|
}
|
|
|
},
|
|
@@ -657,25 +668,13 @@
|
|
|
}
|
|
|
}
|
|
|
that.readForm = res.data
|
|
|
- console.log(res.data+'11111')
|
|
|
-
|
|
|
- // this.bindForm.endtime_cydsb = res.data.endtime_cydsb
|
|
|
- },
|
|
|
- // 任务详情页面返回任务列表
|
|
|
- async back() {
|
|
|
- this.$router.push('routineMonitor')
|
|
|
+ // 抽检不分离
|
|
|
+ if (that.readForm.is_divide == 0) {
|
|
|
+ this.sampleShow = true
|
|
|
+ this.checkShow = true
|
|
|
+ }
|
|
|
},
|
|
|
- // 修改检测报告
|
|
|
- // async update(){
|
|
|
|
|
|
- // const result = await this.$http.post('editSamplePesticides', {
|
|
|
- // sample_id: sample_id,
|
|
|
-
|
|
|
- // })
|
|
|
- // if (result.data.code == 0) {
|
|
|
- // that.formjc = result.data.data
|
|
|
- // }
|
|
|
- // },
|
|
|
// 上传成功
|
|
|
async uploadSuccess(res) {
|
|
|
console.log(res.data)
|
|
@@ -765,7 +764,7 @@
|
|
|
handleClick(tab, event) {
|
|
|
console.log(tab, event);
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 获取抽样单列表
|
|
|
async getSampleList() {
|
|
|
this.queryInfo['task_id'] = this.task_id
|
|
@@ -915,24 +914,24 @@
|
|
|
// margin-left: 35%;
|
|
|
// }
|
|
|
|
|
|
- .el-form-item {
|
|
|
- margin-left: 15px;
|
|
|
- // margin-bottom: 5px;
|
|
|
- }
|
|
|
+ // .el-form-item {
|
|
|
+ // // margin-bottom: 8px;
|
|
|
+ // margin: 0 auto;
|
|
|
+ // }
|
|
|
|
|
|
- .labelItem /deep/ .el-form-item__label {
|
|
|
- // width: 80px;
|
|
|
- text-align: center;
|
|
|
- vertical-align: middle;
|
|
|
- float: left;
|
|
|
- font-size: 14px;
|
|
|
- color: #606266;
|
|
|
- font-weight: bold;
|
|
|
- // line-height: 40px;
|
|
|
- padding: 0 20px 0 0;
|
|
|
- -webkit-box-sizing: border-box;
|
|
|
- box-sizing: border-box;
|
|
|
- }
|
|
|
+ // .labelItem /deep/ .el-form-item__label {
|
|
|
+ // // width: 80px;
|
|
|
+ // text-align: center;
|
|
|
+ // vertical-align: middle;
|
|
|
+ // float: left;
|
|
|
+ // font-size: 14px;
|
|
|
+ // color: #606266;
|
|
|
+ // font-weight: bold;
|
|
|
+ // // line-height: 40px;
|
|
|
+ // padding: 0 20px 0 0;
|
|
|
+ // -webkit-box-sizing: border-box;
|
|
|
+ // box-sizing: border-box;
|
|
|
+ // }
|
|
|
|
|
|
.demonstration {
|
|
|
margin: 20px;
|
|
@@ -941,6 +940,7 @@
|
|
|
.el-form-item__content {
|
|
|
// width: 200px;
|
|
|
}
|
|
|
+
|
|
|
.footer {
|
|
|
margin-top: 20px;
|
|
|
margin-left: 45%;
|