| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- <!-- -->
- <template>
- <div>
- <el-table
- :data="tableData"
- border
- style="width: 100%">
- <el-table-column
- align="center"
- prop="year"
- label="年度"
- width="60">
- </el-table-column>
- <el-table-column
- align="center"
- prop="batch"
- label="批次"
- width="60">
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- label="稽察组长"
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;" v-if="!scope.row.special.length">
- /
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.special.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
- <span>{{scope.row['special']&&scope.row['special'].length?testformatterArray(scope.row['special'],'name'):''}}</span>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- label="助理"
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;" v-if="!scope.row.aid.length">
- /
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.aid.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
- <span>{{scope.row['aid']&&scope.row['aid'].length?testformatterArray(scope.row['aid'],'name'):''}}</span>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- label="前期专家"
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;" v-if="!scope.row.qqzj.length">
- /
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.qqzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
- <span>{{scope.row['qqzj']&&scope.row['qqzj'].length?testformatterArray(scope.row['qqzj'],'name'):''}}</span>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- label="建管专家"
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;" v-if="!scope.row.jgzj.length">
- /
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.jgzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
- <span>{{scope.row['jgzj']&&scope.row['jgzj'].length?testformatterArray(scope.row['jgzj'],'name'):''}}</span>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- label="计划专家"
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;" v-if="!scope.row.jhzj.length">
- /
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.jhzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
- <span>{{scope.row['jhzj']&&scope.row['jhzj'].length?testformatterArray(scope.row['jhzj'],'name'):''}}</span>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- label="财务专家"
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;" v-if="!scope.row.cwzj.length">
- /
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.cwzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
- <span>{{scope.row['cwzj']&&scope.row['cwzj'].length?testformatterArray(scope.row['cwzj'],'name'):''}}</span>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- label="质量专家"
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;" v-if="!scope.row.zlzj.length">
- /
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.zlzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
- <span>{{scope.row['zlzj']&&scope.row['zlzj'].length?testformatterArray(scope.row['zlzj'],'name'):''}}</span>
- </div>
- </transition>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- label="安全专家"
- >
- <template slot-scope="scope">
- <transition name="el-fade-in-linear">
- <div style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;" v-if="!scope.row.aqzj.length">
- /
- </div>
- </transition>
- <transition name="el-fade-in-linear">
- <div v-if="scope.row.aqzj.length" style="width:100%;height:100%;display:flex;flex-direction:row;justify-content:center;align-items:center;">
- <span>{{scope.row['aqzj']&&scope.row['aqzj'].length?testformatterArray(scope.row['aqzj'],'name'):''}}</span>
- </div>
- </transition>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </template>
- <script>
- //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
- //例如:import 《组件名称》 from '《组件路径》';
- import request from '@util/gw_ajax_request'
- // import {formatterValueToLabel,formatterArrayToLabel} from "../../utils/gw_formatter.js";
- import {formatterValueToLabel,formatterArrayToLabel} from "../../../utils/gw_formatter.js";
- // import { getProjectJcInfo } from '../../../api/jcOneMapApi'
- export default {
- //import引入的组件需要注入到对象中才能使用
- props:['projectInfoCon','select_nd','select_pc','tableData'],
- components: {},
- data() {
- //这里存放数据
- return {
- };
- },
- //监听属性 类似于data概念
- computed: {
- },
- //监控data中的数据变化
- watch: {},
- //方法集合
- methods: {
- testformatterArray: function(
- arr,
- labelPropName,
- splitMark = ",",
- nonLabel = "",
- isAddNonLabel = true
- ) {
- let r = formatterArrayToLabel(
- arr,
- labelPropName,
- (splitMark = ","),
- (nonLabel = ""),
- (isAddNonLabel = true)
- );
- return r;
- },
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {
- },
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- // this.getTableData();
- },
- beforeCreate() {}, //生命周期 - 创建之前
- beforeMount() {}, //生命周期 - 挂载之前
- beforeUpdate() {}, //生命周期 - 更新之前
- updated() {}, //生命周期 - 更新之后
- beforeDestroy() {}, //生命周期 - 销毁之前
- destroyed() {}, //生命周期 - 销毁完成
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
- }
- </script>
- <style scoped>
- </style>
|