|
@@ -13,69 +13,49 @@
|
|
|
牵头单位
|
|
|
<el-select v-model="value" placeholder="请选择">
|
|
|
<el-option
|
|
|
- v-for="item in options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
+ v-for="item in qiantouList"
|
|
|
+ :key="item.unit_id"
|
|
|
+ :label="item.unit_id"
|
|
|
+ :value="item.unit_id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<!-- 返回按钮 -->
|
|
|
<div class="btns">
|
|
|
- <el-button type="info" size="small" @click="returnTask">
|
|
|
- 返回任务列表
|
|
|
- </el-button>
|
|
|
- <el-button type="info" size="small" @click="sendBack">
|
|
|
- 退回
|
|
|
+ <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%"
|
|
|
- :row-style="rowStyle"
|
|
|
- :cell-style="cellStyle"
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="50">
|
|
|
- </el-table-column>
|
|
|
+ <el-table ref="multipleTable" :data="tableData" border stripe highlight-current-row style="width: 100%"
|
|
|
+ :row-style="rowStyle" :cell-style="cellStyle" @selection-change="handleSelectionChange">
|
|
|
<el-table-column label="序号" width="50px">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.$index+1 }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <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>
|
|
|
+ <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="操作" align="center" fixed="right">
|
|
|
<!-- 操作按钮区域的作用域插槽 -->
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="success" size="mini" @click="readDialogVisible1(scope.row)">抽样单详情</el-button>
|
|
|
+ <!-- <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 size="small" @click="sendBack()">退回</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<!-- 分页器区域-->
|
|
|
<div class="block">
|
|
|
- <el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="queryInfo.pageNum"
|
|
|
- :page-sizes="[10, 15, 20]"
|
|
|
- :page-size="queryInfo.pageSize"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="total"
|
|
|
- background />
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pageNum"
|
|
|
+ :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>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -88,10 +68,10 @@
|
|
|
data() {
|
|
|
return {
|
|
|
total:0,
|
|
|
- options: [{
|
|
|
- value: '选项1',
|
|
|
- label: '部级监测机构'
|
|
|
- }],
|
|
|
+ // 牵头单位下拉框
|
|
|
+ qiantouList: [
|
|
|
+ ],
|
|
|
+ task_id:'',
|
|
|
queryInfo:{
|
|
|
year:'',
|
|
|
task_name:'',
|
|
@@ -100,7 +80,21 @@
|
|
|
ispublic:'',
|
|
|
pageSize:10,
|
|
|
pageNum:1,
|
|
|
- task_class:'专项监测'
|
|
|
+ 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:''
|
|
|
},
|
|
|
cellStyle: {
|
|
|
padding: 2 + 'px'
|
|
@@ -110,39 +104,39 @@
|
|
|
},
|
|
|
tableHeader: [{
|
|
|
label: '样品名称',
|
|
|
- prop: '',
|
|
|
+ prop: 'sample_name',
|
|
|
width: 150
|
|
|
// fixed: 'left'
|
|
|
},
|
|
|
{
|
|
|
label: '样品编码',
|
|
|
- prop: '',
|
|
|
- width: 80
|
|
|
+ prop: 'sample_id',
|
|
|
+ width: 150
|
|
|
// fixed: 'left'
|
|
|
}, {
|
|
|
label: '商标',
|
|
|
- prop: '',
|
|
|
+ prop: 'brand',
|
|
|
width: 150
|
|
|
// fixed: 'left'
|
|
|
},
|
|
|
{
|
|
|
label: '等级',
|
|
|
- prop: '',
|
|
|
+ prop: 'level',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
label: '抽样基数',
|
|
|
- prop: '',
|
|
|
+ prop: 'sample_base',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
label: '抽样场所',
|
|
|
- prop: '',
|
|
|
+ prop: 'sample_ground',
|
|
|
width: 120
|
|
|
},
|
|
|
{
|
|
|
label: '状态',
|
|
|
- prop: '',
|
|
|
+ prop: 'sample_status',
|
|
|
width: 180
|
|
|
}
|
|
|
],
|
|
@@ -150,29 +144,80 @@
|
|
|
tableData: []
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
-
|
|
|
+ mounted: function() {
|
|
|
+ this.getJgCydList()
|
|
|
+ // 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()
|
|
|
},
|
|
|
+
|
|
|
methods: {
|
|
|
- sendBack(){},
|
|
|
- // 获取牵头单位
|
|
|
- getTaskById(){
|
|
|
- },
|
|
|
- // 获取抽样单列表
|
|
|
- getZLTaskSampleListByJcInfo(){
|
|
|
-
|
|
|
+ handleSizeChange(val) {
|
|
|
+ console.log(`每页 ${val} 条`);
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.queryInfo.pageNum = val;
|
|
|
+ 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
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //返回
|
|
|
returnTask(){
|
|
|
this.$router.push('routineMonitor')
|
|
|
},
|
|
|
- handleSizeChange(val) {
|
|
|
- console.log(`每页 ${val} 条`);
|
|
|
- },
|
|
|
- handleCurrentChange(val) {
|
|
|
- console.log(`当前页: ${val}`);
|
|
|
- }
|
|
|
- },
|
|
|
- }
|
|
|
+
|
|
|
+ /** 监听每页显示多少数据的改变 */
|
|
|
+ handleSizeChange1(newSize) {
|
|
|
+ this.queryInfo.pageSize = newSize
|
|
|
+ this.getJgCydList()
|
|
|
+ },
|
|
|
+
|
|
|
+ /** 监听页码的改变 */
|
|
|
+ handleCurrentChange1(newPage) {
|
|
|
+ this.queryInfo.pageNum = newPage
|
|
|
+ this.getJgCydList()
|
|
|
+ },
|
|
|
+ // 获取抽样单列表
|
|
|
+ async getJgCydList() {
|
|
|
+ const result = await this.$http.post('getJgCydList', {
|
|
|
+ task_id: this.task_id,
|
|
|
+ pageSize:this.queryInfo.pageSize,
|
|
|
+ pageNum:this.queryInfo.pageNum
|
|
|
+ })
|
|
|
+ console.log( result.data)
|
|
|
+ console.log(this.queryInfo.pageSize)
|
|
|
+ if (result.data.code == 0) {
|
|
|
+ this.tableData = result.data.data
|
|
|
+ }
|
|
|
+ console.log(this.tableData)
|
|
|
+ },
|
|
|
+ //查看详情
|
|
|
+ async readDialogVisible1(row) {
|
|
|
+
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
@@ -181,5 +226,6 @@
|
|
|
}
|
|
|
.btns{
|
|
|
float:right;
|
|
|
+ padding: 10px;
|
|
|
}
|
|
|
</style>
|