|
@@ -4,28 +4,17 @@
|
|
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
<el-breadcrumb-item >首页</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>监测任务</el-breadcrumb-item>
|
|
|
- <el-breadcrumb-item>专项监测</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>抽样单</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
</div>
|
|
|
- <!-- 下拉菜单 -->
|
|
|
- <div>
|
|
|
- 牵头单位
|
|
|
- <el-select v-model="value" placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in qiantouList"
|
|
|
- :key="item.unit_id"
|
|
|
- :label="item.unit_id"
|
|
|
- :value="item.unit_id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <!-- 牵头单位弹框 -->
|
|
|
+ <el-button icon="el-icon-search" @click="dialogVisible=true" size="medium">搜索牵头单位</el-button>
|
|
|
<!-- 返回按钮 -->
|
|
|
<div class="btns">
|
|
|
<el-button plain size="" @click="returnTask()">
|
|
|
返回
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
<!-- 表格数据区域-->
|
|
|
<div class="table">
|
|
|
<el-table ref="multipleTable" :data="tableData" border stripe highlight-current-row style="width: 100%"
|
|
@@ -39,9 +28,9 @@
|
|
|
align="center" :width="table.width" :fixed="table.fixed"/>
|
|
|
<el-table-column label="操作" align="center" fixed="right">
|
|
|
<!-- 操作按钮区域的作用域插槽 -->
|
|
|
- <template slot-scope="scope">
|
|
|
+ <template >
|
|
|
<!-- <el-button type="success" size="mini" @click="readDialogVisible1(scope.row)">抽样单详情</el-button> -->
|
|
|
- <el-button style="margin: 5px auto;" type="success" size="small" @click="readDialogVisible1()">查看详情</el-button>
|
|
|
+ <el-button style="margin: 5px auto;" type="success" size="small" @click="readSampleList()">查看详情</el-button>
|
|
|
<el-button size="small" @click="sendBack()">退回</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -52,9 +41,29 @@
|
|
|
:page-sizes="[10, 15, 20]" :page-size="queryInfo.pageSize"
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="total" background />
|
|
|
</div>
|
|
|
- <!-- 查看详情对话框 -->
|
|
|
- <el-dialog title="查看" :visible.sync="readDialogVisible" width="80%" :close-on-click-modal="false" class="dialogItem">
|
|
|
- <el-form v-if="readDialogVisible"></el-form>
|
|
|
+ <!-- 牵头单位弹框 -->
|
|
|
+ <el-dialog title="机构选择" :visible.sync="dialogVisible" width="50%" :close-on-click-modal="ture" :show-close="true" :center="true" @click="getTestList()" >
|
|
|
+ <!-- <el-form v-if="getQtListShow" :model="getTestListForm"> -->
|
|
|
+ <!-- 表格数据区域-->
|
|
|
+ <el-table ref="multipleTable" :data="QtouList" row-key="id" @selection-change="handleSelectionChange()"
|
|
|
+ border stripe highlight-current-row style="width: 100%">
|
|
|
+ <el-table-column type="selection" :reserve-selection="true" width="50"></el-table-column>
|
|
|
+ <el-table-column label="序号" width="50px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.$index+1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :key="table.prop" v-for="table in tableHeader_qt" :label="table.label"
|
|
|
+ :prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
|
|
|
+ </el-table>
|
|
|
+ <div class="footer">
|
|
|
+ <!-- 分页器区域-->
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
+ :current-page="queryInfo.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo.pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="total" background />
|
|
|
+ <el-button type="success" @click="dialogVisible = false" size="small">提交</el-button>
|
|
|
+ </div>
|
|
|
+ <!-- </el-form> -->
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -67,12 +76,12 @@
|
|
|
name: '',
|
|
|
data() {
|
|
|
return {
|
|
|
+
|
|
|
+ //控制弹框显隐
|
|
|
+ dialogVisible: false,
|
|
|
total:0,
|
|
|
- // 牵头单位下拉框
|
|
|
- qiantouList: [
|
|
|
- ],
|
|
|
- task_id:'',
|
|
|
queryInfo:{
|
|
|
+ keyWord: '',
|
|
|
year:'',
|
|
|
task_name:'',
|
|
|
starttime:'',
|
|
@@ -81,20 +90,7 @@
|
|
|
pageSize:10,
|
|
|
pageNum:1,
|
|
|
task_class:'专项监测',
|
|
|
- // sample_id: '',
|
|
|
- // sample_name:'',
|
|
|
- // task_id:'',
|
|
|
- // place:'',
|
|
|
- // sample_date:'',
|
|
|
- // sample_status:'',
|
|
|
- // test_status:'',
|
|
|
- // bear_name:'',
|
|
|
- // check_name:'',
|
|
|
- // report_name:'',
|
|
|
- // underTake_task_id:'',
|
|
|
- // unit_test_name:'',
|
|
|
- // unit_production_name:'',
|
|
|
- // undertake_id:''
|
|
|
+ task_id:'',
|
|
|
},
|
|
|
cellStyle: {
|
|
|
padding: 2 + 'px'
|
|
@@ -111,7 +107,7 @@
|
|
|
{
|
|
|
label: '样品编码',
|
|
|
prop: 'sample_id',
|
|
|
- width: 150
|
|
|
+ width: 200
|
|
|
// fixed: 'left'
|
|
|
}, {
|
|
|
label: '商标',
|
|
@@ -140,20 +136,52 @@
|
|
|
width: 180
|
|
|
}
|
|
|
],
|
|
|
+ // 表头
|
|
|
+ tableHeader_qt: [{
|
|
|
+ label: '单位名称',
|
|
|
+ prop: 'name',
|
|
|
+ width: 300
|
|
|
+ // fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '机构类型',
|
|
|
+ prop: 'jgxz',
|
|
|
+ // width: 40
|
|
|
+ // fixed: 'left'
|
|
|
+ }, {
|
|
|
+ label: '所属区域',
|
|
|
+ prop: 'ssqy',
|
|
|
+ width: 300
|
|
|
+ // fixed: 'left'
|
|
|
+ },{
|
|
|
+ label: '产品范围',
|
|
|
+ prop: 'cpfw',
|
|
|
+ width: 300
|
|
|
+ // fixed: 'left'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ // 总共多少条数据
|
|
|
+ total: 0,
|
|
|
+ // table表格多选选项
|
|
|
+ multipleSelection: null,
|
|
|
+ getQtListShow: {},
|
|
|
+ // 选中的牵头单位
|
|
|
+ orgs: [],
|
|
|
// 数据表格数据
|
|
|
- tableData: []
|
|
|
+ tableData: [],
|
|
|
+ QtouList:[]
|
|
|
}
|
|
|
},
|
|
|
mounted: function() {
|
|
|
this.getJgCydList()
|
|
|
- // this.getQtouList()
|
|
|
+ this.getQtouList()
|
|
|
},
|
|
|
created: function() {
|
|
|
console.log(this.$route.params.task_id)
|
|
|
// this.unit_id = this.$route.params.unit_id
|
|
|
this.task_id = this.$route.params.task_id
|
|
|
this.getJgCydList()
|
|
|
- // this.getQtouList()
|
|
|
+ this.getQtouList()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
@@ -165,20 +193,23 @@
|
|
|
console.log(`当前页: ${val}`);
|
|
|
this.getJgCydList()
|
|
|
},
|
|
|
- // 批量选中
|
|
|
+ //批量选中
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val;
|
|
|
console.log(this.multipleSelection)
|
|
|
},
|
|
|
+
|
|
|
//获取牵头单位列表
|
|
|
- // async getQtouList() {
|
|
|
- // const result = await this.$http.post('getQtouList', {
|
|
|
- // task_id: this.task_id,
|
|
|
- // })
|
|
|
- // if (result.data.code == 0) {
|
|
|
- // this.qiantouList = result.data.data
|
|
|
- // }
|
|
|
- // }
|
|
|
+ async getQtouList() {
|
|
|
+ this.queryInfo['token'] = token
|
|
|
+ const result = await this.$http.post('getQtouList',this.queryInfo )
|
|
|
+ console.log( result.data.data.rows);
|
|
|
+ // 判断业务逻辑
|
|
|
+ if (result.data.code == 0) {
|
|
|
+ this.QtouList = result.data.data.rows
|
|
|
+ this.total = result.data.data.total
|
|
|
+ }
|
|
|
+ },
|
|
|
//返回
|
|
|
returnTask(){
|
|
|
this.$router.push('routineMonitor')
|
|
@@ -195,7 +226,7 @@
|
|
|
this.queryInfo.pageNum = newPage
|
|
|
this.getJgCydList()
|
|
|
},
|
|
|
- // 获取抽样单列表
|
|
|
+ // 获取抽样单列表
|
|
|
async getJgCydList() {
|
|
|
const result = await this.$http.post('getJgCydList', {
|
|
|
task_id: this.task_id,
|
|
@@ -205,15 +236,17 @@
|
|
|
console.log( result.data)
|
|
|
console.log(this.queryInfo.pageSize)
|
|
|
if (result.data.code == 0) {
|
|
|
- this.tableData = result.data.data
|
|
|
+ this.tableData = result.data.data.rows
|
|
|
}
|
|
|
console.log(this.tableData)
|
|
|
},
|
|
|
- //查看详情
|
|
|
- async readDialogVisible1(row) {
|
|
|
-
|
|
|
+ //查看详情
|
|
|
+ async readSampleList(row) {
|
|
|
+ const result = await this.$http.post('readSampleList',{
|
|
|
+ task_id:this.task_id,
|
|
|
+ })
|
|
|
},
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -228,4 +261,10 @@
|
|
|
float:right;
|
|
|
padding: 10px;
|
|
|
}
|
|
|
+.footer {
|
|
|
+ margin-top: 5px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
</style>
|