Commit 886781b9 authored by zhanglw's avatar zhanglw

超链接管理、项目信息管理、大屏人员折线改柱状图

parent 7afc8f84
......@@ -4,8 +4,8 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
// BASE_API: '"http://192.168.3.188:8086"'
BASE_API: '"http://jingkongyun.com:8000"'
BASE_API: '"http://192.168.3.23:8086"'
// BASE_API: '"http://jingkongyun.com:8000"'
// BASE_API: '"https://api.auauz.net"'
})
......@@ -6,29 +6,37 @@ export const HttpReq = {
backstageApi: {
getLinkSrcList: function(params) {
return request({
url: 'word/getAll?' + qs.stringify(params, { indices: false }),
url: 'api/hyperLink?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
updateLinkSrc: function(data) {
return request({
url: 'word/updateIfUp',
method: 'post',
url: 'api/hyperLink',
method: 'put',
data: data
}).then((res) => {
return res
})
},
// 获取所有软件工具
addLinkSrc: function(data) {
return request({
url: 'word/add',
url: 'api/hyperLink',
method: 'post',
data: data
}).then((res) => {
return res
})
},
deleteLinkSrc: function(data) {
return request({
url: 'api/hyperLink',
method: 'delete',
data: data
}).then((res) => {
return res
})
},
api: null
},
// web端接口列表
......
......@@ -387,6 +387,116 @@ export default {
/* eslint-enable */
},
initChart1() {
this.chart1 = echarts.init(this.$refs.chart1, 'macarons')
const dataX = ['1号基地', '2号基地', '3号基地', '4号基地', '5号基地']
const option = {
tooltip: {
trigger: 'item',
formatter: (params, ticket, callback) => {
return params.value + ''
}
},
grid: {
left: '0',
right: '0',
top: '8px',
bottom: '0',
containLabel: true
},
xAxis: [
{
type: 'category',
axisLine: {
show: false,
lineStyle: {
color: '#666'
}
},
axisTick: {
show: false
},
axisLabel: {
color: '#BFF7FF'
},
data: dataX
}
],
yAxis: [
{
type: 'value',
axisLine: {
show: false,
lineStyle: {
color: '#666'
}
},
axisTick: {
show: false
},
axisLabel: {
color: '#BFF7FF'
},
splitLine: {
show: true,
lineStyle: {
color: '#ffffff33'
}
}
}
],
dataZoom: [
{
type: 'inside'
}
],
series: [
{
name: '',
type: 'bar',
barWidth: 15,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#ffffff' },
{ offset: 1, color: '#00ffff' }
])
},
emphasis: {
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#ffffff' },
{ offset: 0.35, color: '#ffffff' },
{ offset: 1, color: '#00ffff' }
])
}
},
data: utils.randNum(25, 40, dataX.length, true)
},
{
name: '',
type: 'bar',
barWidth: 15,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#ffffff' },
{ offset: 1, color: '#f1f155' }
])
},
emphasis: {
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#ffffff' },
{ offset: 0.35, color: '#ffffff' },
{ offset: 1, color: '#f1f155' }
])
}
},
data: utils.randNum(10, 30, dataX.length, true)
}
]
}
this.chart1.setOption(option)
},
_initChart1() {
this.chart1 = echarts.init(this.$refs.chart1, 'macarons')
const count = 24
const dataX = []
......
......@@ -16,8 +16,12 @@
<!--表格渲染-->
<el-table v-loading="loading" :data="tableData" size="small" style="width: 100%;">
<el-table-column :index="indexMethod" type="index" width="55" label="序号" align="center" />
<el-table-column prop="linkName" label="超链接名称" min-width="130%"/>
<el-table-column prop="linkUrl" label="超链接地址" min-width="130%"/>
<el-table-column prop="hyperlinkName" label="超链接名称" min-width="130%"/>
<el-table-column prop="hyperlinkUrl" label="超链接地址" min-width="130%">
<template slot-scope="scope">
<a :href="scope.row.hyperlinkUrl" :title="'点击跳转到'+scope.row.hyperlinkUrl" class="touch link-text" target="_blank">{{ scope.row.hyperlinkUrl }}</a>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['ADMIN','SDEVICE_ALL','SDEVICE_EDIT','SDEVICE_DELETE'])" label="操作" width="150px" align="center">
<template slot-scope="scope">
<el-button v-permission="['ADMIN','SDEVICE_ALL','SDEVICE_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)"/>
......@@ -41,12 +45,12 @@
<!-- 表单渲染 -->
<el-dialog :close-on-click-modal="false" :before-close="cancelForm" :visible.sync="visible" append-to-body title="超链接设置" width="600px">
<el-form ref="formViewRef" :model="formData" label-width="110px">
<el-form-item label="超链接名称:" prop="linkName">
<el-input v-model="formData.linkName" class="cell-input"/>
<el-form-item label="超链接名称:" prop="hyperlinkName">
<el-input v-model="formData.hyperlinkName" class="cell-input"/>
</el-form-item>
<br>
<el-form-item label="超链接地址:" prop="linkUrl">
<el-input v-model="formData.linkUrl" class="cell-input"/>
<el-form-item label="超链接地址:" prop="hyperlinkUrl">
<el-input v-model="formData.hyperlinkUrl" class="cell-input"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -68,37 +72,43 @@ export default {
delLoading: false,
visible: false,
page: 1,
pageSize: 10,
pageSize: 999,
total: 0,
tableData: [],
formData: {
linkName: '',
linkUrl: ''
hyperlinkName: '',
hyperlinkUrl: ''
}
}
},
created() {
this.$nextTick(() => {
this.loadData()
})
},
methods: {
checkPermission,
indexMethod(index) {
return 1 + index + this.page * this.pageSize
return 1 + index + this.page * this.pageSize - this.pageSize
},
loadData() {
// 清除参数无值的情况
HttpReq.backstageApi.getLinkSrcList({
pageNum: this.page,
pageSize: this.pageSize
}).then((res) => {
this.tableData = res.list
this.total = res.totalCount
HttpReq.backstageApi.getLinkSrcList({}).then((res) => {
this.tableData = res.data.records
this.total = res.data.total
})
},
subDelete(item) {
this.delLoading = true
HttpReq.backstageApi.deleteLinkSrc({ id: item.id }).then((res) => {
this.$notify({
title: res.message,
type: res.code === 200 ? 'success' : 'error'
})
if (res.code === 200) {
this.loadData()
}
})
},
pageChange(e) {
this.page = e
......@@ -112,14 +122,14 @@ export default {
cancelForm() {
this.visible = false
this.formData = {
linkName: '',
linkUrl: ''
hyperlinkName: '',
hyperlinkUrl: ''
}
this.loadData()
},
submitForm() {
if (this.formData.id) {
HttpReq.backstageApi.updateWeixinlink(this.formData).then((res) => {
HttpReq.backstageApi.updateLinkSrc(this.formData).then((res) => {
this.$notify({
title: res.message,
type: res.code === 200 ? 'success' : 'error'
......@@ -130,7 +140,7 @@ export default {
}
})
} else {
HttpReq.backstageApi.addWeixinlink(this.formData).then((res) => {
HttpReq.backstageApi.addLinkSrc(this.formData).then((res) => {
this.$notify({
title: res.message,
type: res.code === 200 ? 'success' : 'error'
......@@ -154,5 +164,10 @@ export default {
</script>
<style scoped>
.touch {
cursor:pointer;
}
.link-text {
color: #1482f0;
}
</style>
......@@ -46,6 +46,15 @@
<el-form-item label="地址">
<el-input v-model="form.msg9" style="width: 470px;"/>
</el-form-item>
<el-form-item label="男职工数">
<el-input v-model="form.manNum" style="width: 470px;"/>
</el-form-item>
<el-form-item label="女职工数">
<el-input v-model="form.womanNum" style="width: 470px;"/>
</el-form-item>
<el-form-item label="项目描述">
<el-input v-model="form.projectIntroduction" :rows="4" type="textarea" style="width: 470px;"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="cancel">取消</el-button>
......@@ -81,6 +90,9 @@ export default {
videoadr: '',
createTime: '',
updateTime: '',
manNum: '',
womanNum: '',
projectIntroduction: '',
nt: ''
},
rules: {
......@@ -152,6 +164,9 @@ export default {
videoadr: '',
createTime: '',
updateTime: '',
manNum: '',
womanNum: '',
projectIntroduction: '',
nt: ''
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment