123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <template>
- <div id="pdf1">
- <el-descriptions class="margin-top" :title="readForm.taskInfo.task_class+'任务'" :column="2" :size="size" border>
- <el-descriptions-item>
- <template slot="label">
- 发布单位
- </template>
- {{readForm.releaserInfo.rymc}}
- </el-descriptions-item>
- <el-descriptions-item>
- <template slot="label">
- 年度
- </template>
- {{readForm.taskInfo.year}}
- </el-descriptions-item>
- <el-descriptions-item>
- <template slot="label">
- 开始时间和结束时间
- </template>
- {{readForm.taskInfo.starttime}}-{{readForm.taskInfo.endtime}}
- </el-descriptions-item>
- <el-descriptions-item>
- <template slot="label">
- 抽样信息上报截止时间
- </template>
- {{readForm.taskInfo.endtime_cydsb}}
- </el-descriptions-item>
- <el-descriptions-item>
- <template slot="label">
- 监测类型
- </template>
- {{readForm.taskInfo.task_class}}
- </el-descriptions-item>
- <el-descriptions-item>
- <template slot="label">
- 行业
- </template>
- <!-- <div v-if="readForm.product!=[]"> -->
- <span>{{readForm.model_type}}</span>
- <!-- </div> -->
- <!-- <div v-else>暂无</div> -->
- </el-descriptions-item>
- <el-descriptions-item>
- <template slot="label">
- 抽检分离
- </template>
- <span v-if="readForm.taskInfo.is_divide==1">是</span>
- <span v-if="readForm.taskInfo.is_divide==0">否</span>
- </el-descriptions-item>
- <el-descriptions-item>
- <template slot="label">
- 附件
- </template>
- <div v-if="readForm.taskInfo.file_url==null">无</div>
- <el-link v-else type="primary" :href="readForm.taskInfo.file_url">下载附件</el-link>
- </el-descriptions-item>
- </el-descriptions>
- <el-descriptions class="margin-top" :size="size" border>
- <el-descriptions-item>
- <template slot="label">
- 备注
- </template>
- {{readForm.taskInfo.log}}
- </el-descriptions-item>
- </el-descriptions>
- <el-descriptions class="margin-top" :size="size" border>
- <el-descriptions-item>
- <template slot="label">
- 检测对象
- </template>
- {{productNameText}}
- <!-- <span v-for="item in readForm.product">{{item.product_name}}、</span> -->
- </el-descriptions-item>
- </el-descriptions>
- <el-descriptions class="margin-top" :size="size" border>
- <el-descriptions-item>
- <template slot="label">
- 检测项
- </template>
- {{pesticidesNameText}}
- <!-- <span v-for="item in readForm.pesticides">{{item.test_name}}、</span> -->
- </el-descriptions-item>
- </el-descriptions>
- <el-table :data="underTask" border stripe highlight-current-row style="width: 100%">
- <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>
- </div>
- </template>
- <script>
- export default {
- name: 'taskdetail',
- props: ['task_id'],
- data() {
- return {
- activeName: 'first',
- id: 0,
- task_id: this.task_id,
- readForm: {
- // releaser: '',
- // task_name: '',
- // level: '',
- // task_class: '',
- // year: '',
- modelInfo:{
- creattime:'',
- id:'',
- name:'',
- type_id:'',
- updatetime:'',
- user_id:'',
- },
- releaserInfo:{
- groupname: '',
- rymc:'',
- },
- taskInfo:{
- base_file_url: null,
- batch: '',
- creater: null,
- createtime: null,
- endtime: null,
- endtime_cydsb: null,
- file_name: null,
- file_url: null,
- filenum: null,
- id: null,
- industry: null,
- is_divide: null,
- ispublic:null,
- level:null,
- log: null,
- main_unit: null,
- releaser:null,
- starttime: null,
- status: null,
- task_class: null,
- task_name:null,
- test_model_id:null,
- year: null,
- },
- endtime: '',
- file_url: '',
- filenum: '',
- log: ''
- },
- size: '',
- // 机构地域表格数据
- underTask: [],
- underTasktotal: 0,
- productNameText: '',
- pesticidesNameText: '',
- tableHeader: [{
- label: '抽样机构',
- prop: 'bear_name',
- width: 180,
- }, {
- label: '检测机构',
- prop: 'check_name'
- },
- {
- label: '抽样地区',
- prop: 'address'
- }, {
- label: '抽样数量',
- prop: 'sample_number'
- },
- {
- label: '报告上传单位',
- prop: 'report_name'
- }, {
- label: '报告上传截止时间',
- prop: 'uploadtime'
- }
- ],
- };
- },
- created() {
- this.getTaskDetail();
- // this.getUnderTask();
- },
- methods: {
- handleClick(tab, event) {
- console.log(tab, event);
- },
- // 获取任务详情
- async getTaskDetail() {
- var that = this
- const {
- data: res
- } = await this.$http.post("getTaskDetail", {
- task_id: that.task_id
- });
- console.log(res.data.product)
- // if (res.data.modelInfo.product.length > 0) {
- if (res.data.modelInfo.type_id == '1') {
- res.data.model_type = '种植业'
- } else if (res.data.modelInfo.type_id == '2') {
- res.data.model_type = '畜牧业'
- } else if (res.data.modelInfo.type_id == '3') {
- res.data.model_type = '渔业'
- } else if (res.data.modelInfo.type_id == '4') {
- res.data.model_type = '其他'
- }else {
- res.data.model_type = '无'
- }
- // }
- this.readForm = res.data
- this.underTask = res.data.unitTaskList.rows
- this.underTasktotal = res.data.unitTaskList.total
- console.log(this.readForm.product)
-
- this.readForm.taskInfo.is_divide = res.data.taskInfo.is_divide
-
- this.readForm.taskInfo.endtime_cydsb = res.data.taskInfo.endtime_cydsb
-
- that.productNameText = that.readForm.product.map(el => el.product_name).join('、 ')
- console.log(that.productNameText)
- that.pesticidesNameText = that.readForm.pesticides.map(el => el.test_name).join('、 ')
-
- console.log(this.divideOptions.id)
- },
- // 获取机构地域表格
- // async getUnderTask() {
- // const result = await this.$http.post('getUnderTask', {
- // task_id: this.task_id
- // })
- // // 判断业务逻辑
- // if (result.data.code == 0) {
- // this.underTask = result.data.data.rows
- // this.underTasktotal = result.data.data.total
- // }
- // },
- }
- }
- </script>
- <style>
- </style>
|