This commit is contained in:
龚祖望 2022-11-17 11:18:57 +08:00
parent 4a6cd4fdb5
commit d521f84acf
9 changed files with 43 additions and 46 deletions

View File

@ -2,7 +2,7 @@
* @Author: 龚祖望 573413756@qq.com * @Author: 龚祖望 573413756@qq.com
* @Date: 2022-05-16 09:16:41 * @Date: 2022-05-16 09:16:41
* @LastEditors: 龚祖望 573413756@qq.com * @LastEditors: 龚祖望 573413756@qq.com
* @LastEditTime: 2022-10-19 14:37:55 * @LastEditTime: 2022-11-17 11:13:35
* @FilePath: \dashengda\src\permission.js * @FilePath: \dashengda\src\permission.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */

View File

@ -137,12 +137,6 @@ export const asyncRouter = [
name: 'Terminal', name: 'Terminal',
meta: { title: '设备管理', icon: 'terminal', permission: ['dashengda', 'hangxiao', 'qianjiangdianqi', 'jiangxishida'] }, meta: { title: '设备管理', icon: 'terminal', permission: ['dashengda', 'hangxiao', 'qianjiangdianqi', 'jiangxishida'] },
children: [ children: [
// {
// path: 'product',
// name: 'Product',
// // component: () => import(''),
// meta: { title: '产品分类', disabled: true }
// },
{ {
path: 'add', path: 'add',
name: 'Add', name: 'Add',
@ -305,7 +299,7 @@ const createRouter = () => new Router({
}) })
const router = createRouter() const router = createRouter()
router.addRoutes(asyncRouter) // router.addRoutes(asyncRouter)
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() { export function resetRouter() {

View File

@ -2,11 +2,12 @@
* @Author: 龚祖望 573413756@qq.com * @Author: 龚祖望 573413756@qq.com
* @Date: 2022-05-16 09:16:41 * @Date: 2022-05-16 09:16:41
* @LastEditors: 龚祖望 573413756@qq.com * @LastEditors: 龚祖望 573413756@qq.com
* @LastEditTime: 2022-11-07 15:47:20 * @LastEditTime: 2022-11-17 11:15:19
* @FilePath: \dashengda\src\store\modules\user.js * @FilePath: \dashengda\src\store\modules\user.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
import { login, logout, getInfo } from '@/api/user' import { login, logout, getInfo } from '@/api/user'
import _ from 'lodash'
import { getToken, setToken, removeToken } from '@/utils/auth' import { getToken, setToken, removeToken } from '@/utils/auth'
import { resetRouter, constantRoutes, asyncRouter } from '@/router' import { resetRouter, constantRoutes, asyncRouter } from '@/router'
@ -148,8 +149,8 @@ const actions = {
}, },
generateRoutes({ commit }, roles) { generateRoutes({ commit }, roles) {
return new Promise(resolve => { return new Promise(resolve => {
const accessedRouters = filterAsyncRouter(asyncRouter, roles) const dynamicRouter = _.cloneDeep(asyncRouter)
console.log('accessedRouters', accessedRouters) const accessedRouters = filterAsyncRouter(dynamicRouter, roles)
commit('SET_ROUTERS', accessedRouters) commit('SET_ROUTERS', accessedRouters)
resolve() resolve()
}) })

View File

@ -44,7 +44,6 @@ export default {
signupUrl: 'https://account.le5le.com', signupUrl: 'https://account.le5le.com',
userMenus: defalutUserMenus, userMenus: defalutUserMenus,
dataOptionsFn: (pen, key, value) => { dataOptionsFn: (pen, key, value) => {
console.log(pen, key, value)
const keys = ['aaa', 'bbb'] const keys = ['aaa', 'bbb']
const values = [ const values = [
{ {
@ -111,7 +110,6 @@ export default {
case 'openMaterialGroup': case 'openMaterialGroup':
// / // /
console.log('openMaterialGroup', e.params)
// Do sth. // Do sth.
break break

View File

@ -250,7 +250,6 @@ export default {
// let scale = 0.7; // let scale = 0.7;
const timeEnergyData = [] const timeEnergyData = []
for (j = 0; j < showCount1 - 1; j++) { for (j = 0; j < showCount1 - 1; j++) {
console.log(timeEnergyTotalData)
timeEnergyData.push({ value: sortTimeEnergy[j], name: timeDataAxis[timeEnergyTotalData.indexOf(sortTimeEnergy[j])], ranking: j }) timeEnergyData.push({ value: sortTimeEnergy[j], name: timeDataAxis[timeEnergyTotalData.indexOf(sortTimeEnergy[j])], ranking: j })
} }
// timeEnergyData[0].selected = true; // timeEnergyData[0].selected = true;
@ -750,7 +749,6 @@ export default {
label: { label: {
normal: { normal: {
formatter: function(params) { formatter: function(params) {
console.log(params)
const labelWidth = 3 const labelWidth = 3
const labelWidth2 = 5 const labelWidth2 = 5
if (params.name.length > labelWidth && params.data.ranking === 0 || if (params.name.length > labelWidth && params.data.ranking === 0 ||

View File

@ -2,7 +2,7 @@
* @Author: 龚祖望 573413756@qq.com * @Author: 龚祖望 573413756@qq.com
* @Date: 2022-05-16 09:16:41 * @Date: 2022-05-16 09:16:41
* @LastEditors: 龚祖望 573413756@qq.com * @LastEditors: 龚祖望 573413756@qq.com
* @LastEditTime: 2022-11-15 11:10:07 * @LastEditTime: 2022-11-17 11:17:55
* @FilePath: \dashengda\src\views\dashboard\index.vue * @FilePath: \dashengda\src\views\dashboard\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
@ -69,7 +69,6 @@ export default {
mounted() { mounted() {
const imgs = document.getElementsByClassName('slide-img') const imgs = document.getElementsByClassName('slide-img')
imgs.forEach(item => { imgs.forEach(item => {
console.log('style', item.style)
item.style.height = (window.innerHeight - 115) + 'px' item.style.height = (window.innerHeight - 115) + 'px'
}) })
} }

View File

@ -415,7 +415,6 @@ export default {
async save() { async save() {
this.form.alarmSql = JSON.stringify(this.form.triggerList) this.form.alarmSql = JSON.stringify(this.form.triggerList)
const data = { ...this.form, ruleStatus: 0, org: this.org } const data = { ...this.form, ruleStatus: 0, org: this.org }
console.log('data', data)
let res let res
if (this.type === 0) { if (this.type === 0) {
res = await add(data) res = await add(data)

View File

@ -269,6 +269,14 @@ export default {
val: 0 val: 0
}] }]
} }
if (this.abbrCorpName === '钱江电气') {
res = [{
name: '低压配电房',
src: require('@/assets/images/device3.png'),
color: '#46D5A0',
val: 0
}]
}
if (this.abbrCorpName === '大胜达') { if (this.abbrCorpName === '大胜达') {
res = [ res = [
{ {
@ -462,33 +470,33 @@ export default {
privateserverusername: this.form.privateserverusername || 'admin' privateserverusername: this.form.privateserverusername || 'admin'
} }
await add({ productname, type, no, devicedesc, activestatus: this.form.activestatus, ...dataTemplate }) await add({ productname, type, no, devicedesc, activestatus: this.form.activestatus, ...dataTemplate })
await axios.post('/cgi-bin/tcpip_save', { // await axios.post('/cgi-bin/tcpip_save', {
local_ipaddr: this.form.ipaddr, // local_ipaddr: this.form.ipaddr,
netmask_addr: this.form.netmask, // netmask_addr: this.form.netmask,
gateway_addr: this.form.gateway, // gateway_addr: this.form.gateway,
dns_server0: this.form.dnsserver0, // dns_server0: this.form.dnsserver0,
dns_server1: this.form.dnsserver1 // dns_server1: this.form.dnsserver1
}, { headers: { // }, { headers: {
Authorization: 'Basic YWRtaW46YWRtaW4=' // Authorization: 'Basic YWRtaW46YWRtaW4='
}}) // }})
await axios.post('/cgi-bin/mqtt_save', { // await axios.post('/cgi-bin/mqtt_save', {
pub_topic: this.form.topic, // pub_topic: this.form.topic,
server_addr: this.form.serveraddr, // server_addr: this.form.serveraddr,
server_port: this.form.serverport, // server_port: this.form.serverport,
username: this.form.username, // username: this.form.username,
password: this.form.password, // password: this.form.password,
clientID: this.form.clientid // clientID: this.form.clientid
}, { headers: { // }, { headers: {
Authorization: 'Basic YWRtaW46YWRtaW4=' // Authorization: 'Basic YWRtaW46YWRtaW4='
}}) // }})
await axios.post('/cgi-bin/private_prt_save', { // await axios.post('/cgi-bin/private_prt_save', {
server_addr: this.form.privateserveraddr, // server_addr: this.form.privateserveraddr,
server_port: this.form.privateserverport, // server_port: this.form.privateserverport,
username: this.form.privateserverusername, // username: this.form.privateserverusername,
passward: this.form.privateserverpassword // passward: this.form.privateserverpassword
}, { headers: { // }, { headers: {
Authorization: 'Basic YWRtaW46YWRtaW4=' // Authorization: 'Basic YWRtaW46YWRtaW4='
}}) // }})
if (this.form.activestatus === 0) { if (this.form.activestatus === 0) {
this.disactiveList.push(temp) this.disactiveList.push(temp)
} else { } else {

View File

@ -225,7 +225,6 @@ export default {
} }
}, },
mounted() { mounted() {
this.current = this.deviceList[0]
this.getList() this.getList()
}, },
methods: { methods: {
@ -236,6 +235,7 @@ export default {
res.data.forEach(item => { res.data.forEach(item => {
this.deviceList.push({ ...item, status: item.runstatus }) this.deviceList.push({ ...item, status: item.runstatus })
}) })
this.current = this.deviceList[0]
} }
}) })
}, },