123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <template>
- <div style="width: 100%">
- <!-- 标题栏导航 -->
- <div slot="header" class="clearfix">
- <el-breadcrumb separator-class="el-icon-arrow-right">
- <el-breadcrumb-item >首页</el-breadcrumb-item>
- <el-breadcrumb-item>{{parentName}}</el-breadcrumb-item>
- <el-breadcrumb-item>{{labelName}}</el-breadcrumb-item>
- </el-breadcrumb>
- </div>
- <!-- 表格区域 -->
- <el-table :data="tableData" border stripe highlight-current-row style="width: 100%" >
- <el-table-column :key="table.label" v-for="table in tableHeader2" :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 @click="read(scope.row.task_id,scope.row.id)" style="margin:5px 0" type="success" size="small" >查看检测单列表</el-button>
- </template>
- </el-table-column>
- </el-table>
- <!--分页器区域-->
- <el-pagination class="feyeqi" @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 class="btns">
- <el-button plain size="medium" @click="returnTask()" >
- 返回
- </el-button>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- // 数据表格数据
- tableData: [],
- sampleOrgId:{},
- parentName:'',
- labelName:'',
- queryInfo:{
- pageSize:10,
- pageNum:1,
- // task_class:'例行监测',
- task_id:'',
- // task_profile_id:''
- cyd_status_condition:'',
- cyd_status:''
- },
- total:0,
- tableHeader2: [{
- label: '抽样机构',
- prop: 'sampleOrgId.name',
- width: 180,
- }, {
- label: '检测机构',
- prop: 'checkOrgId.name'
- },
- {
- label: '抽样地区',
- prop: 'sample_address'
- },
- ]
- }
- },
- mounted() {
- this.getJgTaskProfiles()
- },
- created() {
- this.task_id = this.$route.params.id
- this.parentName = this.$route.params.parentName
- this.labelName = this.$route.params.labelName
- this.getJgTaskProfiles()
- },
- methods: {
- //返回
- returnTask(){
- console.log(this.parentName)
- if(this.parentName == '例行监测'){
- this.$router.push({
- name:'routineMonitor',
- params:{
- task_id:this.$route.params.id
- }
- })
- }
- else if(this.parentName == '专项监测'){
- this.$router.push({
- name:'specialMonitor',
- params:{
- task_id:this.$route.params.id
- }
- })
- }
- else if(this.parentName == '监督抽查'){
- this.$router.push({
- name:'checkMonitor',
- params:{
- task_id:this.$route.params.id
- }
- })
- }else{
- this.$router.push({
- name:'reTask',
- params:{
- task_id:this.$route.params.id
- }
- })
- }
- },
- // 获取检测机构列表
- async getJgTaskProfiles() {
- var that = this
- const { data: res} = await this.$http.post("getJgTaskProfiles", {
- task_id: that.task_id,
- task_profile_id:that.id,
- pageNum: that.queryInfo.pageNum,
- pageSize: that.queryInfo.pageSize
- });
- that.tableData = res.data.rows
- that.total = res.data.total
- },
- //查看检测单列表
- read(task_id,id){
- // console.log(11)
- // console.log(id)
- // console.log(task_id)
- this.$router.push({
- name:'readCheckList',
- params: {
- task_id:task_id,
- task_profile_id:id
- }
- })
- },
- //分页器
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- },
- handleCurrentChange(val) {
- this.queryInfo.pageNum = val;
- console.log(`当前页: ${val}`);
- this.getJgTaskProfiles()
- },
- /** 监听页码的改变 */
- handleCurrentChange(newPage) {
- this.queryInfo.pageNum = newPage
- this.getJgTaskProfiles()
- },
- /** 监听每页显示多少数据的改变 */
- handleSizeChange(newSize) {
- this.queryInfo.pageSize = newSize
- this.getJgTaskProfiles()
- },
- },
- }
- </script>
- <style>
- .btns{
- float:right;
- /* margin-top: 10px; */
- padding: 10px;
- }
- .feyeqi{
- margin-top: 10px;
- }
- </style>
|