123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562 |
- <template>
- <div>
- <select-panel @searchActive="searchActive" @clearData="clearData" @clearTarget="clearTarget" @yearChange="yearChange" style="margin-bottom:16px"/>
- <el-table
- :data="tableData"
- style="width: 100%"
- height="calc(100vh - 182px)"
- size="small">
- <el-table-column
- prop="depfullname"
- label="部门"
- width="120"
- fixed>
- <template slot-scope="scope">
- <p>{{scope.row.depfullname}}</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="name"
- label="人员"
- width="80"
- fixed>
- <template slot-scope="scope">
- <p>{{scope.row.name?scope.row.name:'--'}}</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="position"
- label="职位"
- width="100"
- fixed>
- <template slot-scope="scope">
- <p>{{scope.row.position?scope.row.position:'--'}}</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="projectnum"
- label="项目数量"
- width="100"
- fixed>
- <template slot-scope="scope">
- <p>{{scope.row.projectnum?scope.row.projectnum:'--'}}</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="projectname"
- label="项目名称"
- width="100"
- fixed>
- <template slot-scope="scope">
- <p>{{scope.row.projectname?scope.row.projectname:'--'}}</p>
- </template>
- </el-table-column>
- <el-table-column
- label="目标/实际"
- width="100">
- <template>
- <p class="center d-text">目标</p>
- <p class="border"></p>
- <p class="center d-text">实际</p>
- </template>
- </el-table-column>
- <el-table-column label="年度(万元)">
- <el-table-column
- prop="y1l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.y1l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.y1a}}</p>
- <p class="center" :class="scope.row.y1pl < 0?'green':'red'">({{scope.row.y1pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="y1h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.y1h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.y1a}}</p>
- <p class="center" :class="scope.row.y1ph < 0?'green':'red'">({{scope.row.y1ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="第一季度(万元)">
- <el-table-column
- prop="s1l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.s1l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.s1a}}</p>
- <p class="center" :class="scope.row.s1pl < 0?'green':'red'">({{scope.row.s1pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="s1h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.s1h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.s1a}}</p>
- <p class="center" :class="scope.row.s1ph < 0?'green':'red'">({{scope.row.s1ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="一月(万元)">
- <el-table-column
- prop="m1l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m1l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m1a}}</p>
- <p class="center" :class="scope.row.m1pl < 0?'green':'red'">({{scope.row.m1pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m1h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m1h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m1a}}</p>
- <p class="center" :class="scope.row.m1ph < 0?'green':'red'">({{scope.row.m1ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="二月(万元)">
- <el-table-column
- prop="m2l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m2l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m2a}}</p>
- <p class="center" :class="scope.row.m2pl < 0?'green':'red'">({{scope.row.m2pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m2h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m2h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m2a}}</p>
- <p class="center" :class="scope.row.m2ph < 0?'green':'red'">({{scope.row.m2ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="三月(万元)">
- <el-table-column
- prop="m3l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m3l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m3a}}</p>
- <p class="center" :class="scope.row.m3pl < 0?'green':'red'">({{scope.row.m3pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m3h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m3h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m3a}}</p>
- <p class="center" :class="scope.row.m3ph < 0?'green':'red'">({{scope.row.m3ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="第二季度(万元)">
- <el-table-column
- prop="s2l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.s2l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.s2a}}</p>
- <p class="center" :class="scope.row.s2pl < 0?'green':'red'">({{scope.row.s2pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="s2h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.s2h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.s2a}}</p>
- <p class="center" :class="scope.row.s2ph < 0?'green':'red'">({{scope.row.s2ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="四月(万元)">
- <el-table-column
- prop="m4l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m4l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m4a}}</p>
- <p class="center" :class="scope.row.m4pl < 0?'green':'red'">({{scope.row.m4pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m4h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m4h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m4a}}</p>
- <p class="center" :class="scope.row.m4ph < 0?'green':'red'">({{scope.row.m4ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="五月(万元)">
- <el-table-column
- prop="m5l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m5l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m5a}}</p>
- <p class="center" :class="scope.row.m5pl < 0?'green':'red'">({{scope.row.m5pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m5h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m5h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m5a}}</p>
- <p class="center" :class="scope.row.m5ph < 0?'green':'red'">({{scope.row.m5ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="六月(万元)">
- <el-table-column
- prop="m6l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m6l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m6a}}</p>
- <p class="center" :class="scope.row.m6pl < 0?'green':'red'">({{scope.row.m6pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m6h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m6h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m6a}}</p>
- <p class="center" :class="scope.row.m6ph < 0?'green':'red'">({{scope.row.m6ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="第三季度(万元)">
- <el-table-column
- prop="s3l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.s3l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.s3a}}</p>
- <p class="center" :class="scope.row.s3pl < 0?'green':'red'">({{scope.row.s3pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="s3h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.s3h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.s3a}}</p>
- <p class="center" :class="scope.row.s3ph < 0?'green':'red'">({{scope.row.s3ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="七月(万元)">
- <el-table-column
- prop="m7l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m7l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m7a}}</p>
- <p class="center" :class="scope.row.m7pl < 0?'green':'red'">({{scope.row.m7pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m7h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m7h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m7a}}</p>
- <p class="center" :class="scope.row.m7ph < 0?'green':'red'">({{scope.row.m7ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="八月(万元)">
- <el-table-column
- prop="m8l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m8l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m8a}}</p>
- <p class="center" :class="scope.row.m8pl < 0?'green':'red'">({{scope.row.m8pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m8h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m8h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m8a}}</p>
- <p class="center" :class="scope.row.m8ph < 0?'green':'red'">({{scope.row.m8ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="九月(万元)">
- <el-table-column
- prop="m9l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m9l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m9a}}</p>
- <p class="center" :class="scope.row.m9pl < 0?'green':'red'">({{scope.row.m9pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m9h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m9h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m9a}}</p>
- <p class="center" :class="scope.row.m9ph < 0?'green':'red'">({{scope.row.m9ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="第四季度(万元)">
- <el-table-column
- prop="s4l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.s4l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.s4a}}</p>
- <p class="center" :class="scope.row.s4pl < 0?'green':'red'">({{scope.row.s4pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="s4h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.s4h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.s4a}}</p>
- <p class="center" :class="scope.row.s4ph < 0?'green':'red'">({{scope.row.s4ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="十月(万元)">
- <el-table-column
- prop="m10l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m10l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m10a}}</p>
- <p class="center" :class="scope.row.m10pl < 0?'green':'red'">({{scope.row.m10pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m10h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m10h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m10a}}</p>
- <p class="center" :class="scope.row.m10ph < 0?'green':'red'">({{scope.row.m10ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="十一月(万元)">
- <el-table-column
- prop="m11l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m11l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m11a}}</p>
- <p class="center" :class="scope.row.m11pl < 0?'green':'red'">({{scope.row.m11pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m11h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m11h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m11a}}</p>
- <p class="center" :class="scope.row.m11ph < 0?'green':'red'">({{scope.row.m11ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column label="十二月(万元)">
- <el-table-column
- prop="m12l"
- label="基本"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m12l}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m12a}}</p>
- <p class="center" :class="scope.row.m12pl < 0?'green':'red'">({{scope.row.m12pl}}%)</p>
- </template>
- </el-table-column>
- <el-table-column
- prop="m12h"
- label="挑战"
- width="120">
- <template slot-scope="scope">
- <p class="center d-text">{{scope.row.m12h}}</p>
- <p class="border"></p>
- <p class="center">{{scope.row.m12a}}</p>
- <p class="center" :class="scope.row.m12ph < 0?'green':'red'">({{scope.row.m12ph}}%)</p>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column
- prop="operation"
- label="操作"
- width="120">
- <template slot-scope="scope">
- <slot :data="{data:scope.row,year:year}" name="edit"/>
- <slot :data="{data:scope.row,year:year}" name="detail"/>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </template>
- <script>
- import selectPanel from '../components/selectPanel'
- export default {
- data () {
- return {
- tableData:[],
- year:String((new Date()).getFullYear()),
- condition:''
- }
- },
- components:{selectPanel},
- watch: {
- year: {
- handler(val) {
- this.queryData()
- }
- }
- },
- methods:{
- async queryData () {
- const res = await this.$api.requested({
- "id": 20220909154602,
- "content": {
- "nocache":true,
- "year": this.year,
- "type":1,
- "where":{
- "condition":this.condition//支持部门名称查询
- }
- },
- })
- this.tableData = res.data
- console.log(this.tableData);
-
- },
- /* 清空指标 */
- clearTarget() {
- },
- /* 年度更改 */
- yearChange(time) {
- this.year = time
- },
- searchActive(data) {
- this.condition = data
- this.queryData()
- },
- clearData() {
- this.condition = ''
- this.queryData()
- }
- },
- mounted () {
- this.queryData()
- }
- }
- </script>
- <style>
- </style>
- <style scoped>
- .d-text{
- height: 46px;
- line-height: 46px;
- }
- .border{
- border:1px solid #c1bfbf;
- transform: scale(1,.2);
- }
- .center{
- text-align: center;
- }
- .red{
- color:red
- }
- .green{
- color:green
- }
- </style>
|