BUG修改

This commit is contained in:
a0049873 2022-07-07 10:27:46 +08:00
parent e6528b4b3b
commit 4a1126cf94
2 changed files with 174 additions and 179 deletions

View File

@ -28,108 +28,108 @@
</div>
</template>
<script>
import contentTitle from "./content-title";
import * as Apis from '../api';
import contentTitle from './content-title'
import * as Apis from '../api'
export default {
components: {
contentTitle
},
data() {
data () {
return {
title: { dynamic: "部门发布动态", recommend: "部门推荐能力" },
title: { dynamic: '部门发布动态', recommend: '部门推荐能力' },
list: [],
columns: [
{
title: "名称",
key: "name",
dataIndex: "name",
title: '名称',
key: 'name',
dataIndex: 'name',
width: 250
},
{
title: "类型",
key: "type",
dataIndex: "type",
title: '类型',
key: 'type',
dataIndex: 'type',
width: 76
},
{
title: "单位",
key: "deptContacts",
dataIndex: "deptContacts",
title: '单位',
key: 'deptContacts',
dataIndex: 'deptContacts',
width: 144
},
{
title: "时间",
key: "createDate",
dataIndex: "createDate",
title: '时间',
key: 'createDate',
dataIndex: 'createDate',
width: 153
},
{
title: "当前申请数",
key: "applyCount",
dataIndex: "applyCount",
title: '当前申请数',
key: 'applyCount',
dataIndex: 'applyCount',
width: 145
},
}
],
tableData: [],
maxSize: { y: 195 },
loadingDynamic: false,
loadingTable: false,
};
loadingTable: false
}
},
mounted() {
this.getResourceByDept();
mounted () {
this.getResourceByDept()
this.getApplyByDept()
},
methods: {
//
getResourceByDept() {
let data = {
getResourceByDept () {
const data = {
limit: 5,
page: 1
};
this.loadingDynamic = true;
}
this.loadingDynamic = true
Apis.getResourceByDept(
data,
res => {
this.loadingDynamic = false;
this.loadingDynamic = false
if (res.data.code !== 0) {
return this.$message.error(res.data.msg)
}
console.log('res.data----发布动态-------->', res.data);
console.log('res.data----发布动态-------->', res.data)
this.list = res.data.data.list || []
this.list.push(this.list[0])
this.list.push(this.list[0])
// this.list.push({})
// this.list.push({})
},
err => {
this.loadingDynamic = false;
this.loadingDynamic = false
this.$message.error(err)
console.log('err-----发布动态------->', err);
console.log('err-----发布动态------->', err)
}
);
)
},
//
getApplyByDept() {
let data = {
getApplyByDept () {
const data = {
limit: 5,
page: 1
};
this.loadingTable = true;
}
this.loadingTable = true
Apis.getApplyByDept(
data,
res => {
this.loadingTable = false;
this.loadingTable = false
if (res.data.code !== 0) {
return this.$message.error(res.data.msg)
}
console.log('res.data------部门推荐能力------>', res.data);
this.tableData = res.data.data.list || [];
console.log('res.data------部门推荐能力------>', res.data)
this.tableData = res.data.data.list || []
},
err => {
this.loadingTable = false;
this.loadingTable = false
this.$message.error(err)
console.log("err", err);
console.log('err', err)
}
);
)
}
}
}
@ -142,7 +142,6 @@ export default {
text-overflow: ellipsis;
}
.bottom-view {
width: 100%;
height: 335px;

View File

@ -25,7 +25,7 @@
</div>
<div class="flex-row-between row-name" v-for="(data, i) in listInfo" :key="i">
<div class="left">
<div class="row-index">{{ i + 3 }}</div>
<div class="row-index">{{ i + 4 }}</div>
<el-tooltip effect="dark" :content="data.name" placement="top">
<div class="name-text ellipsis">{{ data.name || '--' }}</div>
</el-tooltip>
@ -41,185 +41,181 @@
import * as Apis from '../api.js'
import contentTitle from './content-title.vue'
export default {
data() {
return {
listInfo: [],
colorObj: {
1: '#4658710',
2: '#734204',
3: '#805932',
},
no1Obj: {
name: '',
count: '',
},
no2Obj: {
name: '',
count: '',
},
no3Obj: {
name: '',
count: '',
},
noData: false,
loading: true,
};
},
mounted() {
this.getData();
},
methods: {
//
getData() {
let data = {
limit: 5,
page: 1,
};
this.loading = true
Apis.getFrequence(data, res => {
this.loading = false;
if (res.data.code !== 0) {
return this.$message.error(res.data.msg);
}
console.log("res----频率-------->", res.data);
let _arr = res.data.data.records || [];
if (_arr.length == 0) {
this.noData = true
return;
}
for (let i = 0; i < 3; i++) {
let k = i + 1;
this[`no${k}Obj`].name = _arr[i].name
this[`no${k}Obj`].count = _arr[i].count
}
this.listInfo = []
this.listInfo.push(_arr[3] || {})
this.listInfo.push(_arr[4] || {})
}, err => {
this.loading = false;
this.$message.error(err);
});
},
formatCount(count) {
return count || count === 0 ? count : '--'
data () {
return {
listInfo: [],
colorObj: {
1: '#4658710',
2: '#734204',
3: '#805932'
},
no1Obj: {
name: '',
count: ''
},
no2Obj: {
name: '',
count: ''
},
no3Obj: {
name: '',
count: ''
},
noData: false,
loading: true
}
},
mounted () {
this.getData()
},
methods: {
//
getData () {
const data = {
limit: 5,
page: 1
}
this.loading = true
Apis.getFrequence(data, res => {
this.loading = false
if (res.data.code !== 0) {
return this.$message.error(res.data.msg)
}
console.log('res----频率-------->', res.data)
const _arr = res.data.data.records || []
if (_arr.length == 0) {
this.noData = true
return
}
for (let i = 0; i < 3; i++) {
const k = i + 1
this[`no${k}Obj`].name = _arr[i].name
this[`no${k}Obj`].count = _arr[i].count
}
this.listInfo = []
this.listInfo.push(_arr[3] || {})
this.listInfo.push(_arr[4] || {})
}, err => {
this.loading = false
this.$message.error(err)
})
},
components: { contentTitle }
formatCount (count) {
return count || count === 0 ? count : '--'
}
},
components: { contentTitle }
}
</script>
<style lang="scss" scoped>
.ellipsis {
//
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
//
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.flex-row-between {
display: flex;
width: 100%;
margin-bottom: 8px;
height: 52px;
align-items: center;
justify-content: space-between;
padding-left: 10px;
padding-right: 16px;
box-sizing: border-box;
display: flex;
width: 100%;
margin-bottom: 8px;
height: 52px;
align-items: center;
justify-content: space-between;
padding-left: 10px;
padding-right: 16px;
box-sizing: border-box;
}
.left {
display: flex;
display: flex;
}
.frequency {
width: 540px;
height: 335px;
background: #fff;
padding: 0 16px;
box-sizing: border-box;
width: 540px;
height: 335px;
background: #fff;
padding: 0 16px;
box-sizing: border-box;
}
.no-box {
display: flex;
align-items: center;
justify-content: flex-start;
margin-bottom: 24px;
display: flex;
align-items: center;
justify-content: flex-start;
margin-bottom: 24px;
}
.no1 {
width: 170px;
height: 120px;
margin-top: -20px;
background-image: url("~@/assets/img/workBench/NO1.png");
width: 170px;
height: 120px;
margin-top: -20px;
background-image: url("~@/assets/img/workBench/NO1.png");
}
.no {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.no2 {
width: 170px;
height: 120px;
margin-top: 10px;
background-image: url("~@/assets/img/workBench/NO2.png");
width: 170px;
height: 120px;
margin-top: 10px;
background-image: url("~@/assets/img/workBench/NO2.png");
}
.no3 {
width: 170px;
height: 120px;
margin-top: 10px;
background-image: url("~@/assets/img/workBench/NO3.png");
width: 170px;
height: 120px;
margin-top: 10px;
background-image: url("~@/assets/img/workBench/NO3.png");
}
.name {
font-size: 16px;
margin-bottom: 10px;
margin-top: 70px;
width: 150px;
text-align: center;
font-size: 16px;
margin-bottom: 10px;
margin-top: 70px;
width: 150px;
text-align: center;
}
.count {
font-size: 18px;
color: #2b2b2b;
font-size: 18px;
color: #2b2b2b;
}
.row-name {
background: #f4f5f8;
border-radius: 1px;
background: #f4f5f8;
border-radius: 1px;
}
.row-index {
font-size: 16px;
color: #414d60;
font-size: 16px;
color: #414d60;
}
.name-text {
font-size: 16px;
color: #464545;
margin-left: 10px;
width: 430px;
font-size: 16px;
color: #464545;
margin-left: 10px;
width: 430px;
}
.num-text {
font-size: 14px;
color: #2b2b2b;
font-size: 14px;
color: #2b2b2b;
}
.no-data {
width: 540px;
height: 300px;
background: #fff;
line-height: 232px;
font-size: 16px;
color: #212121;
text-align: center;
width: 540px;
height: 300px;
background: #fff;
line-height: 232px;
font-size: 16px;
color: #212121;
text-align: center;
}
</style>