Commit 886781b9 authored by zhanglw's avatar zhanglw

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

parent 7afc8f84
...@@ -4,8 +4,8 @@ const prodEnv = require('./prod.env') ...@@ -4,8 +4,8 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"development"', NODE_ENV: '"development"',
// BASE_API: '"http://192.168.3.188:8086"' BASE_API: '"http://192.168.3.23:8086"'
BASE_API: '"http://jingkongyun.com:8000"' // BASE_API: '"http://jingkongyun.com:8000"'
// BASE_API: '"https://api.auauz.net"' // BASE_API: '"https://api.auauz.net"'
}) })
...@@ -6,29 +6,37 @@ export const HttpReq = { ...@@ -6,29 +6,37 @@ export const HttpReq = {
backstageApi: { backstageApi: {
getLinkSrcList: function(params) { getLinkSrcList: function(params) {
return request({ return request({
url: 'word/getAll?' + qs.stringify(params, { indices: false }), url: 'api/hyperLink?' + qs.stringify(params, { indices: false }),
method: 'get' method: 'get'
}) })
}, },
updateLinkSrc: function(data) { updateLinkSrc: function(data) {
return request({ return request({
url: 'word/updateIfUp', url: 'api/hyperLink',
method: 'post', method: 'put',
data: data data: data
}).then((res) => { }).then((res) => {
return res return res
}) })
}, },
// 获取所有软件工具
addLinkSrc: function(data) { addLinkSrc: function(data) {
return request({ return request({
url: 'word/add', url: 'api/hyperLink',
method: 'post', method: 'post',
data: data data: data
}).then((res) => { }).then((res) => {
return res return res
}) })
}, },
deleteLinkSrc: function(data) {
return request({
url: 'api/hyperLink',
method: 'delete',
data: data
}).then((res) => {
return res
})
},
api: null api: null
}, },
// web端接口列表 // web端接口列表
......
...@@ -387,6 +387,116 @@ export default { ...@@ -387,6 +387,116 @@ export default {
/* eslint-enable */ /* eslint-enable */
}, },
initChart1() { 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') this.chart1 = echarts.init(this.$refs.chart1, 'macarons')
const count = 24 const count = 24
const dataX = [] const dataX = []
......
...@@ -16,8 +16,12 @@ ...@@ -16,8 +16,12 @@
<!--表格渲染--> <!--表格渲染-->
<el-table v-loading="loading" :data="tableData" size="small" style="width: 100%;"> <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 :index="indexMethod" type="index" width="55" label="序号" align="center" />
<el-table-column prop="linkName" label="超链接名称" min-width="130%"/> <el-table-column prop="hyperlinkName" label="超链接名称" min-width="130%"/>
<el-table-column prop="linkUrl" 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"> <el-table-column v-if="checkPermission(['ADMIN','SDEVICE_ALL','SDEVICE_EDIT','SDEVICE_DELETE'])" label="操作" width="150px" align="center">
<template slot-scope="scope"> <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)"/> <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 @@ ...@@ -41,12 +45,12 @@
<!-- 表单渲染 --> <!-- 表单渲染 -->
<el-dialog :close-on-click-modal="false" :before-close="cancelForm" :visible.sync="visible" append-to-body title="超链接设置" width="600px"> <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 ref="formViewRef" :model="formData" label-width="110px">
<el-form-item label="超链接名称:" prop="linkName"> <el-form-item label="超链接名称:" prop="hyperlinkName">
<el-input v-model="formData.linkName" class="cell-input"/> <el-input v-model="formData.hyperlinkName" class="cell-input"/>
</el-form-item> </el-form-item>
<br> <br>
<el-form-item label="超链接地址:" prop="linkUrl"> <el-form-item label="超链接地址:" prop="hyperlinkUrl">
<el-input v-model="formData.linkUrl" class="cell-input"/> <el-input v-model="formData.hyperlinkUrl" class="cell-input"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -68,37 +72,43 @@ export default { ...@@ -68,37 +72,43 @@ export default {
delLoading: false, delLoading: false,
visible: false, visible: false,
page: 1, page: 1,
pageSize: 10, pageSize: 999,
total: 0, total: 0,
tableData: [], tableData: [],
formData: { formData: {
linkName: '', hyperlinkName: '',
linkUrl: '' hyperlinkUrl: ''
} }
} }
}, },
created() { created() {
this.$nextTick(() => { this.$nextTick(() => {
this.loadData()
}) })
}, },
methods: { methods: {
checkPermission, checkPermission,
indexMethod(index) { indexMethod(index) {
return 1 + index + this.page * this.pageSize return 1 + index + this.page * this.pageSize - this.pageSize
}, },
loadData() { loadData() {
// 清除参数无值的情况 // 清除参数无值的情况
HttpReq.backstageApi.getLinkSrcList({ HttpReq.backstageApi.getLinkSrcList({}).then((res) => {
pageNum: this.page, this.tableData = res.data.records
pageSize: this.pageSize this.total = res.data.total
}).then((res) => {
this.tableData = res.list
this.total = res.totalCount
}) })
}, },
subDelete(item) { subDelete(item) {
this.delLoading = true 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) { pageChange(e) {
this.page = e this.page = e
...@@ -112,14 +122,14 @@ export default { ...@@ -112,14 +122,14 @@ export default {
cancelForm() { cancelForm() {
this.visible = false this.visible = false
this.formData = { this.formData = {
linkName: '', hyperlinkName: '',
linkUrl: '' hyperlinkUrl: ''
} }
this.loadData() this.loadData()
}, },
submitForm() { submitForm() {
if (this.formData.id) { if (this.formData.id) {
HttpReq.backstageApi.updateWeixinlink(this.formData).then((res) => { HttpReq.backstageApi.updateLinkSrc(this.formData).then((res) => {
this.$notify({ this.$notify({
title: res.message, title: res.message,
type: res.code === 200 ? 'success' : 'error' type: res.code === 200 ? 'success' : 'error'
...@@ -130,7 +140,7 @@ export default { ...@@ -130,7 +140,7 @@ export default {
} }
}) })
} else { } else {
HttpReq.backstageApi.addWeixinlink(this.formData).then((res) => { HttpReq.backstageApi.addLinkSrc(this.formData).then((res) => {
this.$notify({ this.$notify({
title: res.message, title: res.message,
type: res.code === 200 ? 'success' : 'error' type: res.code === 200 ? 'success' : 'error'
...@@ -154,5 +164,10 @@ export default { ...@@ -154,5 +164,10 @@ export default {
</script> </script>
<style scoped> <style scoped>
.touch {
cursor:pointer;
}
.link-text {
color: #1482f0;
}
</style> </style>
...@@ -46,6 +46,15 @@ ...@@ -46,6 +46,15 @@
<el-form-item label="地址"> <el-form-item label="地址">
<el-input v-model="form.msg9" style="width: 470px;"/> <el-input v-model="form.msg9" style="width: 470px;"/>
</el-form-item> </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> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="text" @click="cancel">取消</el-button> <el-button type="text" @click="cancel">取消</el-button>
...@@ -81,6 +90,9 @@ export default { ...@@ -81,6 +90,9 @@ export default {
videoadr: '', videoadr: '',
createTime: '', createTime: '',
updateTime: '', updateTime: '',
manNum: '',
womanNum: '',
projectIntroduction: '',
nt: '' nt: ''
}, },
rules: { rules: {
...@@ -152,6 +164,9 @@ export default { ...@@ -152,6 +164,9 @@ export default {
videoadr: '', videoadr: '',
createTime: '', createTime: '',
updateTime: '', updateTime: '',
manNum: '',
womanNum: '',
projectIntroduction: '',
nt: '' 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